Add a nullcheck in DOMProxyHandler::EnsureExpandoObject jic.

This commit is contained in:
wolfbeast 2018-06-15 14:03:56 +02:00 committed by Roy Tam
commit 290eea38cf

View file

@ -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);