From f54f002abc95acf23cfaa93579e60b58148128d1 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 15 Jun 2018 14:03:56 +0200 Subject: Add a nullcheck in DOMProxyHandler::EnsureExpandoObject jic. --- dom/bindings/DOMJSProxyHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dom/bindings') 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 obj) nsISupports* native = UnwrapDOMObject(obj); nsWrapperCache* cache; CallQueryInterface(native, &cache); + if (!cache) { + return expando; + } + if (expandoAndGeneration) { cache->PreserveWrapper(native); expandoAndGeneration->expando.setObject(*expando); -- cgit v1.2.3