summaryrefslogtreecommitdiff
path: root/dom/bindings
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-15 14:03:56 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-15 14:03:56 +0200
commitf54f002abc95acf23cfaa93579e60b58148128d1 (patch)
tree1279354a64957e795a86746a356fa92d568404f0 /dom/bindings
parent129e3c1dbf05d8e0ee2b53990d532bb0c211ac11 (diff)
downloaduxp-f54f002abc95acf23cfaa93579e60b58148128d1.tar.gz
Add a nullcheck in DOMProxyHandler::EnsureExpandoObject jic.
Diffstat (limited to 'dom/bindings')
-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 65e540bc1d..23f0abd883 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);