mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Bug 1142859. Don't parent the object created by JS_DefineObject to the object we're defining on. r=waldo
This commit is contained in:
parent
c4105cdb82
commit
562ae11f1e
@ -2604,7 +2604,7 @@ JS_DefineObject(JSContext *cx, HandleObject obj, const char *name, const JSClass
|
||||
if (!clasp)
|
||||
clasp = &PlainObject::class_; /* default class is Object */
|
||||
|
||||
RootedObject nobj(cx, NewObjectWithClassProto(cx, clasp, NullPtr(), obj));
|
||||
RootedObject nobj(cx, NewObjectWithClassProto(cx, clasp, NullPtr(), NullPtr()));
|
||||
if (!nobj)
|
||||
return nullptr;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user