mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 627758 - Handle cancelled GC runs properly (r=dmandelin)
--HG-- extra : rebase_source : a215df78cb2bedb190f8655df4cd5b7dd6ec5f3a
This commit is contained in:
parent
672dd55a28
commit
6a333d3f55
@ -523,8 +523,15 @@ jsds_GCCallbackProc (JSContext *cx, JSGCStatus status)
|
||||
}
|
||||
|
||||
gGCStatus = status;
|
||||
if (gLastGCProc)
|
||||
return gLastGCProc (cx, status);
|
||||
if (gLastGCProc && !gLastGCProc (cx, status)) {
|
||||
/*
|
||||
* If gLastGCProc returns false, then the GC will abort without making
|
||||
* another callback with status=JSGC_END, so set the status to JSGC_END
|
||||
* here.
|
||||
*/
|
||||
gGCStatus = JSGC_END;
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
@ -2599,7 +2606,8 @@ jsdService::Off (void)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
JSContext *cx = JSD_GetDefaultJSContext(mCx);
|
||||
jsds_NotifyPendingDeadScripts(cx);
|
||||
while (gDeadScripts)
|
||||
jsds_NotifyPendingDeadScripts (cx);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user