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