Bug 765990 - Never use Rooted<T> as a temporary, so that the Rooted->Handle conversion path occurs in only one manner, not two (ambiguous) manners. r=luke
This commit is contained in:
@@ -2699,8 +2699,8 @@ js_InitDateClass(JSContext *cx, JSObject *obj)
|
||||
RootedId toUTCStringId(cx, NameToId(cx->runtime->atomState.toUTCStringAtom));
|
||||
RootedId toGMTStringId(cx, NameToId(cx->runtime->atomState.toGMTStringAtom));
|
||||
if (!baseops::GetProperty(cx, dateProto, toUTCStringId, &toUTCStringFun) ||
|
||||
!baseops::DefineProperty(cx, dateProto, toGMTStringId, &toUTCStringFun,
|
||||
JS_PropertyStub, JS_StrictPropertyStub, 0))
|
||||
!baseops::DefineGeneric(cx, dateProto, toGMTStringId, &toUTCStringFun,
|
||||
JS_PropertyStub, JS_StrictPropertyStub, 0))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user