mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1142282 part 3. Remove the parent argument of NewNativeObjectWithClassProto. r=waldo
This commit is contained in:
parent
d906706022
commit
530e295577
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user