mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Ensure that JSOPTION_UNROOTED_GLOBAL is set when we cycle collect (stop-gap measure for bug 584495, r=brendan).
This commit is contained in:
parent
9f5d2e6532
commit
ea8ed0fbf0
@ -498,6 +498,15 @@ JSBool XPCJSRuntime::GCCallback(JSContext *cx, JSGCStatus status)
|
|||||||
{
|
{
|
||||||
return JS_FALSE;
|
return JS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We seem to sometime lose the unrooted global flag. Restore it
|
||||||
|
// here. FIXME: bug 584495.
|
||||||
|
JSContext *iter = nsnull, *acx;
|
||||||
|
|
||||||
|
while((acx = JS_ContextIterator(cx->runtime, &iter))) {
|
||||||
|
if (!JS_HAS_OPTION(acx, JSOPTION_UNROOTED_GLOBAL))
|
||||||
|
JS_ToggleOptions(acx, JSOPTION_UNROOTED_GLOBAL);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case JSGC_MARK_END:
|
case JSGC_MARK_END:
|
||||||
|
Loading…
Reference in New Issue
Block a user