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:
Jeff Walden
2012-06-14 19:13:27 -07:00
parent 24c6b0e0f9
commit fbb6152ef0
42 changed files with 680 additions and 465 deletions

View File

@@ -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;
}