Bug 1136520. Stop parenting Xray expando objects to a non-global. r=bholley

This commit is contained in:
Boris Zbarsky 2015-02-26 09:40:08 -05:00
parent 554e87c495
commit a00f32b28f

View File

@ -942,10 +942,9 @@ XrayTraits::attachExpandoObject(JSContext *cx, HandleObject target,
}
#endif
// Create the expando object. We parent it directly to the target object.
// Create the expando object.
RootedObject expandoObject(cx,
JS_DeprecatedNewObjectWithGivenProtoAndParent(cx, &ExpandoObjectClass,
JS::NullPtr(), target));
JS_NewObjectWithGivenProto(cx, &ExpandoObjectClass, JS::NullPtr()));
if (!expandoObject)
return nullptr;