Permalink
Browse files

Fix breakage from StorageList going away.

  • Loading branch information...
1 parent 9d1a9a6 commit 7039bc48900bacf4470f96ac8111e79dd7081774 @janodvarko janodvarko committed Apr 12, 2012
View
4 extension/content/firebug/chrome/reps.js
@@ -645,7 +645,7 @@ FirebugReps.Arr = domplate(Firebug.Rep,
else if (obj instanceof Ci.nsIDOMHistory)
return false;
// do this first to avoid security 1000 errors
- else if (obj instanceof view.StorageList)
+ else if ("StorageList" in view && obj instanceof view.StorageList)
return false;
// do this first to avoid exceptions
else if (obj.toString() === "[xpconnect wrapped native prototype]")
@@ -2522,7 +2522,7 @@ FirebugReps.StorageList = domplate(Firebug.Rep,
supportsObject: function(object, type)
{
- return (object instanceof window.StorageList);
+ return ("StorageList" in window && object instanceof window.StorageList);
},
getRealObject: function(object, context)
View
4 extension/content/firebug/dom/domPanel.js
@@ -435,7 +435,7 @@ Firebug.DOMBasePanel.prototype = Obj.extend(Firebug.Panel,
if (isArguments(object))
object = Arr.cloneArray(object);
- if (object instanceof window.StorageList)
+ if ("StorageList" in window && object instanceof window.StorageList)
{
var domain = context.window.location.hostname;
object = object.namedItem(domain);
@@ -662,7 +662,7 @@ Firebug.DOMBasePanel.prototype = Obj.extend(Firebug.Panel,
}
}
- if (value instanceof window.StorageList)
+ if ("StorageList" in window && value instanceof window.StorageList)
{
var domain = context.window.location.hostname;
hasChildren = value.namedItem(domain).length > 0;
View
4 extension/content/firebug/lib/wrapper.js
@@ -21,7 +21,7 @@ Wrapper.getContentView = function(object)
// There is an exception when accessing StorageList.wrappedJSObject (which is
// instance of StorageObsolete)
- if (object instanceof window.StorageList)
+ if ("StorageList" in window && object instanceof window.StorageList)
return false;
return (object.wrappedJSObject);
@@ -35,7 +35,7 @@ Wrapper.unwrapObject = function(object)
// There is an exception when accessing StorageList.wrappedJSObject (which is
// instance of StorageObsolete)
- if (object instanceof window.StorageList)
+ if ("StorageList" in window && object instanceof window.StorageList)
return object;
if (object.wrappedJSObject)

0 comments on commit 7039bc4

Please sign in to comment.