Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix breakage from StorageList going away.

  • Loading branch information...
commit 4629c495b5c2881f2a6f993c79a10ec27692f0c4 1 parent 8d1a151
@simonlindholm simonlindholm authored
View
4 extension/content/firebug/chrome/reps.js
@@ -658,7 +658,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]")
@@ -2704,7 +2704,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
@@ -436,7 +436,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);
@@ -663,7 +663,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
12 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 object && object instanceof window.StorageList)
return false;
return (object.wrappedJSObject);
@@ -35,14 +35,8 @@ Wrapper.unwrapObject = function(object)
// There is an exception when accessing StorageList.wrappedJSObject (which is
// instance of StorageObsolete)
- try
- {
- if (object instanceof window.StorageList)
- return object;
- }
- catch (e)
- {
- }
+ if ("StorageList" in object && object instanceof window.StorageList)
+ return object;
if (object.wrappedJSObject)
return object.wrappedJSObject;
Please sign in to comment.
Something went wrong with that request. Please try again.