summaryrefslogtreecommitdiffstats
path: root/dom/bindings/DOMJSProxyHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/bindings/DOMJSProxyHandler.cpp')
-rw-r--r--dom/bindings/DOMJSProxyHandler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/dom/bindings/DOMJSProxyHandler.cpp b/dom/bindings/DOMJSProxyHandler.cpp
index 65e540bc1..23f0abd88 100644
--- a/dom/bindings/DOMJSProxyHandler.cpp
+++ b/dom/bindings/DOMJSProxyHandler.cpp
@@ -166,6 +166,10 @@ DOMProxyHandler::EnsureExpandoObject(JSContext* cx, JS::Handle<JSObject*> obj)
nsISupports* native = UnwrapDOMObject<nsISupports>(obj);
nsWrapperCache* cache;
CallQueryInterface(native, &cache);
+ if (!cache) {
+ return expando;
+ }
+
if (expandoAndGeneration) {
cache->PreserveWrapper(native);
expandoAndGeneration->expando.setObject(*expando);