Bug 399746: Page Info -> Media broken when there is an image with a JS-reserved word (like 'watch') as alt attribute. r=mano, r=db48x, sr=neil (over IRC), a1.9=beltzner

This commit is contained in:
florian@queze.net 2007-12-14 12:41:13 -08:00
parent bf811ea6a4
commit 1f26f95153

View File

@ -557,11 +557,11 @@ function addImage(url, type, alt, elem, isBg)
{
if (!url)
return;
if (!(url in gImageHash))
if (!gImageHash.hasOwnProperty(url))
gImageHash[url] = { };
if (!(type in gImageHash[url]))
if (!gImageHash[url].hasOwnProperty(type))
gImageHash[url][type] = { };
if (!(alt in gImageHash[url][type])) {
if (!gImageHash[url][type].hasOwnProperty(alt)) {
gImageHash[url][type][alt] = gImageView.data.length;
try {
// open for READ, in non-blocking mode