Avoid goto across initialization of sprop2 (446508).

This commit is contained in:
Andreas Gal
2008-08-11 11:43:40 -07:00
parent 961332e901
commit 553ec4927d

View File

@@ -386,6 +386,8 @@ js_FastNewObject(JSContext* cx, JSObject* ctor)
bool FASTCALL
js_AddProperty(JSContext* cx, JSObject* obj, JSScopeProperty* sprop)
{
JSScopeProperty* sprop2 = NULL; // initialize early to make MSVC happy
JS_ASSERT(OBJ_IS_NATIVE(obj));
JS_ASSERT(SPROP_HAS_STUB_SETTER(sprop));
@@ -422,9 +424,9 @@ js_AddProperty(JSContext* cx, JSObject* obj, JSScopeProperty* sprop)
return true;
}
JSScopeProperty* sprop2 = js_AddScopeProperty(cx, scope, sprop->id,
sprop->getter, sprop->setter, SPROP_INVALID_SLOT,
sprop->attrs, sprop->flags, sprop->shortid);
sprop2 = js_AddScopeProperty(cx, scope, sprop->id,
sprop->getter, sprop->setter, SPROP_INVALID_SLOT,
sprop->attrs, sprop->flags, sprop->shortid);
if (sprop2 == sprop) {
JS_UNLOCK_SCOPE(cx, scope);
return true;