mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 481514 - PurgeScopeChain should not deep-bail quite so eagerly (r=jorendorff, a=sayrer).
This commit is contained in:
parent
862f9eb6d3
commit
fa172251b0
@ -3594,6 +3594,15 @@ PurgeProtoChain(JSContext *cx, JSObject *obj, jsid id)
|
||||
PCMETER(JS_PROPERTY_CACHE(cx).pcpurges++);
|
||||
SCOPE_MAKE_UNIQUE_SHAPE(cx, scope);
|
||||
JS_UNLOCK_SCOPE(cx, scope);
|
||||
|
||||
if (!STOBJ_GET_PARENT(scope->object)) {
|
||||
/*
|
||||
* All scope chains end in a global object, so this will change
|
||||
* the global shape. jstracer.cpp assumes that the global shape
|
||||
* never changes on trace, so we must deep-bail here.
|
||||
*/
|
||||
js_LeaveTrace(cx);
|
||||
}
|
||||
return JS_TRUE;
|
||||
}
|
||||
obj = LOCKED_OBJ_GET_PROTO(scope->object);
|
||||
@ -3607,13 +3616,6 @@ js_PurgeScopeChainHelper(JSContext *cx, JSObject *obj, jsid id)
|
||||
{
|
||||
JS_ASSERT(OBJ_IS_DELEGATE(cx, obj));
|
||||
|
||||
/*
|
||||
* All scope chains end in a global object, so this will change the global
|
||||
* shape. jstracer.cpp assumes that the global shape never changes on
|
||||
* trace, so we must deep-bail here.
|
||||
*/
|
||||
js_LeaveTrace(cx);
|
||||
|
||||
PurgeProtoChain(cx, OBJ_GET_PROTO(cx, obj), id);
|
||||
while ((obj = OBJ_GET_PARENT(cx, obj)) != NULL) {
|
||||
if (PurgeProtoChain(cx, obj, id))
|
||||
|
Loading…
Reference in New Issue
Block a user