Bug 959012 - Remove unused cx parameter from JS_IdentifyClassPrototype. r=jorendorff

This commit is contained in:
Bobby Holley 2014-01-30 07:45:16 -08:00
parent 3d866047a2
commit d3fddee6a0
4 changed files with 4 additions and 7 deletions

View File

@ -1374,11 +1374,8 @@ JS_GetClassPrototype(JSContext *cx, JSProtoKey key, MutableHandleObject objp)
}
JS_PUBLIC_API(JSProtoKey)
JS_IdentifyClassPrototype(JSContext *cx, JSObject *obj)
JS_IdentifyClassPrototype(JSObject *obj)
{
AssertHeapIsIdle(cx);
CHECK_REQUEST(cx);
assertSameCompartment(cx, obj);
JS_ASSERT(!obj->is<CrossCompartmentWrapperObject>());
return js_IdentifyClassPrototype(obj);
}

View File

@ -1796,7 +1796,7 @@ extern JS_PUBLIC_API(bool)
JS_GetClassPrototype(JSContext *cx, JSProtoKey key, JS::MutableHandle<JSObject*> objp);
extern JS_PUBLIC_API(JSProtoKey)
JS_IdentifyClassPrototype(JSContext *cx, JSObject *obj);
JS_IdentifyClassPrototype(JSObject *obj);
extern JS_PUBLIC_API(JSProtoKey)
JS_IdToProtoKey(JSContext *cx, JS::HandleId id);

View File

@ -36,7 +36,7 @@ PropIsFromStandardPrototype(JSContext *cx, JS::MutableHandle<JSPropertyDescripto
MOZ_ASSERT(desc.object());
RootedObject unwrapped(cx, js::UncheckedUnwrap(desc.object()));
JSAutoCompartment ac(cx, unwrapped);
return JS_IdentifyClassPrototype(cx, unwrapped) != JSProto_Null;
return JS_IdentifyClassPrototype(unwrapped) != JSProto_Null;
}
// Note that we're past the policy enforcement stage, here, so we can query

View File

@ -174,7 +174,7 @@ WrapperFactory::PrepareForWrapping(JSContext *cx, HandleObject scope,
JSProtoKey key = JSProto_Null;
{
JSAutoCompartment ac(cx, obj);
key = JS_IdentifyClassPrototype(cx, obj);
key = JS_IdentifyClassPrototype(obj);
}
if (key != JSProto_Null) {
RootedObject homeProto(cx);