mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 887334 - Null-check compartment() in JS_GetGlobalForScopeChain(). r=luke
cx->global() assumes a non-null compartment(). When we fix up various bugs related to being in a compartment when we shouldn't be, we start to crash here. Fix it.
This commit is contained in:
parent
a5bbbb322d
commit
36f005e12f
@ -2087,6 +2087,8 @@ JS_GetGlobalForScopeChain(JSContext *cx)
|
||||
{
|
||||
AssertHeapIsIdleOrIterating(cx);
|
||||
CHECK_REQUEST(cx);
|
||||
if (!cx->compartment())
|
||||
return NULL;
|
||||
return cx->global();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user