mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1451172, fallback to current global in FindAssociatedGlobal when nsIGlobalObject doesn't have JS object anymore, r=bz
--HG-- extra : rebase_source : f5c520bd4019e6a8b940307355c68135e7e0cb9c
This commit is contained in:
parent
7786b357e9
commit
b89a51dc36
@ -1721,7 +1721,9 @@ FindAssociatedGlobal(JSContext* cx, nsIGlobalObject* const& p)
|
||||
|
||||
JSObject* global = p->GetGlobalJSObject();
|
||||
if (!global) {
|
||||
return nullptr;
|
||||
// nsIGlobalObject doesn't have a JS object anymore,
|
||||
// fallback to the current global.
|
||||
return JS::CurrentGlobalOrNull(cx);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(JS_IsGlobalObject(global));
|
||||
|
Loading…
Reference in New Issue
Block a user