mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 869742 - Add post-barriers for writes to liveScopes; r=billm
--HG-- extra : rebase_source : 37596559db5d11f160f2c220a27effd575c9b508
This commit is contained in:
parent
4cdbb3efde
commit
58b5fc50ba
@ -1723,6 +1723,7 @@ DebugScopes::addDebugScope(JSContext *cx, const ScopeIter &si, DebugScopeObject
|
||||
js_ReportOutOfMemory(cx);
|
||||
return false;
|
||||
}
|
||||
HashTableWriteBarrierPost(cx->runtime, &scopes->liveScopes, &debugScope.scope());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1872,10 +1873,12 @@ DebugScopes::onGeneratorFrameChange(AbstractFramePtr from, AbstractFramePtr to,
|
||||
*/
|
||||
JS_ASSERT(toIter.scope().compartment() == cx->compartment);
|
||||
LiveScopeMap::AddPtr livePtr = scopes->liveScopes.lookupForAdd(&toIter.scope());
|
||||
if (livePtr)
|
||||
if (livePtr) {
|
||||
livePtr->value = to;
|
||||
else
|
||||
} else {
|
||||
scopes->liveScopes.add(livePtr, &toIter.scope(), to); // OOM here?
|
||||
HashTableWriteBarrierPost(cx->runtime, &scopes->liveScopes, &toIter.scope());
|
||||
}
|
||||
} else {
|
||||
ScopeIter si(toIter, from, cx);
|
||||
JS_ASSERT(si.frame().scopeChain()->compartment() == cx->compartment);
|
||||
@ -1936,6 +1939,7 @@ DebugScopes::updateLiveScopes(JSContext *cx)
|
||||
return false;
|
||||
if (!scopes->liveScopes.put(&si.scope(), frame))
|
||||
return false;
|
||||
HashTableWriteBarrierPost(cx->runtime, &scopes->liveScopes, &si.scope());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user