mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779073 - Don't treat GC verifier as an incremental GC (r=terrence)
This commit is contained in:
parent
6663628f6b
commit
01cbc0f8ee
@ -1549,7 +1549,7 @@ JS_TransplantObject(JSContext *cx, JSObject *origobjArg, JSObject *targetArg)
|
||||
* for that GC. Hence, we finish any ongoing incremental GC before the
|
||||
* transplant to avoid leaks.
|
||||
*/
|
||||
if (cx->runtime->gcIncrementalState != NO_INCREMENTAL) {
|
||||
if (IsIncrementalGCInProgress(cx->runtime)) {
|
||||
PrepareForIncrementalGC(cx->runtime);
|
||||
FinishIncrementalGC(cx->runtime, gcreason::TRANSPLANT);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ js::PrepareForFullGC(JSRuntime *rt)
|
||||
JS_FRIEND_API(void)
|
||||
js::PrepareForIncrementalGC(JSRuntime *rt)
|
||||
{
|
||||
if (rt->gcIncrementalState == gc::NO_INCREMENTAL)
|
||||
if (!IsIncrementalGCInProgress(rt))
|
||||
return;
|
||||
|
||||
for (CompartmentsIter c(rt); !c.done(); c.next()) {
|
||||
@ -795,7 +795,7 @@ NotifyDidPaint(JSRuntime *rt)
|
||||
return;
|
||||
}
|
||||
|
||||
if (rt->gcIncrementalState != gc::NO_INCREMENTAL && !rt->gcInterFrameGC) {
|
||||
if (IsIncrementalGCInProgress(rt) && !rt->gcInterFrameGC) {
|
||||
PrepareForIncrementalGC(rt);
|
||||
GCSlice(rt, GC_NORMAL, gcreason::REFRESH_FRAME);
|
||||
}
|
||||
@ -809,6 +809,12 @@ IsIncrementalGCEnabled(JSRuntime *rt)
|
||||
return rt->gcIncrementalEnabled && rt->gcMode == JSGC_MODE_INCREMENTAL;
|
||||
}
|
||||
|
||||
JS_FRIEND_API(bool)
|
||||
IsIncrementalGCInProgress(JSRuntime *rt)
|
||||
{
|
||||
return (rt->gcIncrementalState != gc::NO_INCREMENTAL && !rt->gcVerifyPreData);
|
||||
}
|
||||
|
||||
extern JS_FRIEND_API(void)
|
||||
DisableIncrementalGC(JSRuntime *rt)
|
||||
{
|
||||
|
@ -809,6 +809,9 @@ NotifyDidPaint(JSRuntime *rt);
|
||||
extern JS_FRIEND_API(bool)
|
||||
IsIncrementalGCEnabled(JSRuntime *rt);
|
||||
|
||||
JS_FRIEND_API(bool)
|
||||
IsIncrementalGCInProgress(JSRuntime *rt);
|
||||
|
||||
extern JS_FRIEND_API(void)
|
||||
DisableIncrementalGC(JSRuntime *rt);
|
||||
|
||||
|
@ -1339,7 +1339,7 @@ js::SaveScriptFilename(JSContext *cx, const char *filename)
|
||||
* scripts or exceptions pointing to the filename may no longer be
|
||||
* reachable.
|
||||
*/
|
||||
if (rt->gcIncrementalState != NO_INCREMENTAL && rt->gcIsFull)
|
||||
if (IsIncrementalGCInProgress(rt) && rt->gcIsFull)
|
||||
sfe->marked = true;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user