bug 487204 - NativeGet caching fixes. r=brendan
This commit is contained in:
@@ -4166,7 +4166,7 @@ js_NativeGet(JSContext *cx, JSObject *obj, JSObject *pobj,
|
||||
JSScope *scope;
|
||||
uint32 slot;
|
||||
int32 sample;
|
||||
JSTempValueRooter tvr;
|
||||
JSTempValueRooter tvr, tvr2;
|
||||
JSBool ok;
|
||||
|
||||
JS_ASSERT(OBJ_IS_NATIVE(pobj));
|
||||
@@ -4184,7 +4184,9 @@ js_NativeGet(JSContext *cx, JSObject *obj, JSObject *pobj,
|
||||
sample = cx->runtime->propertyRemovals;
|
||||
JS_UNLOCK_SCOPE(cx, scope);
|
||||
JS_PUSH_TEMP_ROOT_SPROP(cx, sprop, &tvr);
|
||||
JS_PUSH_TEMP_ROOT_OBJECT(cx, pobj, &tvr2);
|
||||
ok = js_GetSprop(cx, sprop, obj, vp);
|
||||
JS_POP_TEMP_ROOT(cx, &tvr2);
|
||||
JS_POP_TEMP_ROOT(cx, &tvr);
|
||||
if (!ok)
|
||||
return JS_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user