Closed Bug 1449986 Opened 2 years ago Closed 2 years ago
Builtin Class Instance instead of New Object With Class Proto when proto is nullptr
Calling |NewObjectWithClassProto(JSContext*, HandleObject proto = nullptr, NewObjectKind newKind = GenericObject)| with an absent |proto| argument is exactly identical to calling |NewBuiltinClassInstance(...)|, except that |NewBuiltinClassInstance(...)| was specifically added to cover the use case when |proto| is always |nullptr|. Similar to that case, calling |NewObjectWithClassProto(...)| with an explicit |proto = nullptr| could also be changed to |NewBuiltinClassInstance(...)|.
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Attachment #8975584 - Flags: review?(jorendorff)
Attachment #8975584 - Flags: review?(jorendorff) → review+
Rebased to apply cleanly on inbound. Carrying r+.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/1f10db43a17e Use NewBuiltinClassInstance when requesting default prototype. r=jorendorff
You need to log in before you can comment on or make changes to this bug.