diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-06-15 14:03:56 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-15 14:03:56 +0200 |
commit | f54f002abc95acf23cfaa93579e60b58148128d1 (patch) | |
tree | 1279354a64957e795a86746a356fa92d568404f0 /dom/bindings | |
parent | 129e3c1dbf05d8e0ee2b53990d532bb0c211ac11 (diff) | |
download | UXP-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')
-rw-r--r-- | dom/bindings/DOMJSProxyHandler.cpp | 4 |
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); |