diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 4926f0012c6..06cb6b62adc 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -2469,12 +2469,9 @@ DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, H /* * Create the prototype object. (GlobalObject::createBlankPrototype isn't - * used because it parents the prototype object to the global and because - * it uses WithProto::Given. FIXME: Undo dependencies on this parentage - * [which already needs to happen for bug 638316], figure out nicer - * semantics for null-protoProto, and use createBlankPrototype.) + * used because it won't let us use protoProto as the proto. */ - RootedNativeObject proto(cx, NewNativeObjectWithClassProto(cx, clasp, protoProto, obj, SingletonObject)); + RootedNativeObject proto(cx, NewNativeObjectWithClassProto(cx, clasp, protoProto, SingletonObject)); if (!proto) return nullptr; diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index bab1b49a096..5d8d81930a9 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -166,8 +166,7 @@ js::OnUnknownMethod(JSContext *cx, HandleObject obj, Value idval_, MutableHandle return false; if (value.isObject()) { - NativeObject *obj = NewNativeObjectWithClassProto(cx, &js_NoSuchMethodClass, NullPtr(), - NullPtr()); + NativeObject *obj = NewNativeObjectWithClassProto(cx, &js_NoSuchMethodClass, NullPtr()); if (!obj) return false; diff --git a/js/src/vm/NativeObject-inl.h b/js/src/vm/NativeObject-inl.h index c1cc0157687..6baecb717f7 100644 --- a/js/src/vm/NativeObject-inl.h +++ b/js/src/vm/NativeObject-inl.h @@ -376,17 +376,17 @@ NewNativeObjectWithGivenProto(ExclusiveContext *cx, const Class *clasp, inline NativeObject * NewNativeObjectWithClassProto(ExclusiveContext *cx, const Class *clasp, HandleObject proto, - HandleObject parent, gc::AllocKind allocKind, + gc::AllocKind allocKind, NewObjectKind newKind = GenericObject) { - return MaybeNativeObject(NewObjectWithClassProto(cx, clasp, proto, parent, allocKind, newKind)); + return MaybeNativeObject(NewObjectWithClassProto(cx, clasp, proto, NullPtr(), allocKind, newKind)); } inline NativeObject * NewNativeObjectWithClassProto(ExclusiveContext *cx, const Class *clasp, HandleObject proto, - HandleObject parent, NewObjectKind newKind = GenericObject) + NewObjectKind newKind = GenericObject) { - return MaybeNativeObject(NewObjectWithClassProto(cx, clasp, proto, parent, newKind)); + return MaybeNativeObject(NewObjectWithClassProto(cx, clasp, proto, NullPtr(), newKind)); } /*