mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 576386 - AddPropertyHelper builtin would crash under JS_UNLOCK_SCOPE if js_GetMutableScope fails. r=jorendorff.
This commit is contained in:
parent
d52d02e814
commit
2445345373
@ -204,13 +204,13 @@ AddPropertyHelper(JSContext* cx, JSObject* obj, JSScopeProperty* sprop, bool isD
|
||||
uint32 slot = sprop->slot;
|
||||
JSScope* scope = obj->scope();
|
||||
if (slot != scope->freeslot)
|
||||
goto exit_trace;
|
||||
return false;
|
||||
JS_ASSERT(sprop->parent == scope->lastProperty());
|
||||
|
||||
if (scope->isSharedEmpty()) {
|
||||
scope = js_GetMutableScope(cx, obj);
|
||||
if (!scope)
|
||||
goto exit_trace;
|
||||
return false;
|
||||
} else {
|
||||
JS_ASSERT(!scope->hasProperty(sprop));
|
||||
}
|
||||
@ -243,11 +243,11 @@ AddPropertyHelper(JSContext* cx, JSObject* obj, JSScopeProperty* sprop, bool isD
|
||||
goto exit_trace;
|
||||
|
||||
JS_UNLOCK_SCOPE(cx, scope);
|
||||
return JS_TRUE;
|
||||
return true;
|
||||
|
||||
exit_trace:
|
||||
JS_UNLOCK_SCOPE(cx, scope);
|
||||
return JS_FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
JSBool FASTCALL
|
||||
|
Loading…
Reference in New Issue
Block a user