summaryrefslogtreecommitdiffstats
path: root/dom/bindings/DOMJSProxyHandler.cpp
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/DOMJSProxyHandler.cpp
parent129e3c1dbf05d8e0ee2b53990d532bb0c211ac11 (diff)
downloadUXP-f54f002abc95acf23cfaa93579e60b58148128d1.tar
UXP-f54f002abc95acf23cfaa93579e60b58148128d1.tar.gz
UXP-f54f002abc95acf23cfaa93579e60b58148128d1.tar.lz
UXP-f54f002abc95acf23cfaa93579e60b58148128d1.tar.xz
UXP-f54f002abc95acf23cfaa93579e60b58148128d1.zip
Add a nullcheck in DOMProxyHandler::EnsureExpandoObject jic.
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);