Closed Bug 1142282 Opened 5 years ago Closed 5 years ago

Remove parent arguments from NewNativeObjectWith*Proto

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

No description provided.
Blocks: 1142296
Comment on attachment 8576295 [details] [diff] [review]
part 1.  Remove the parent argument of NewNativeObjectWithGivenProto

Review of attachment 8576295 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/vm/Debugger.cpp
@@ -5824,5 @@
>          RootedObject proto(cx, GlobalObject::getOrCreateArrayPrototype(cx, global));
>          if (!proto)
>              return false;
> -        argsobj = NewNativeObjectWithGivenProto(cx, &DebuggerArguments_class, proto,
> -                                                GlobalObject::upcast(global));

You're removing an awful lot of GlobalObject::upcast uses.  Maybe worth seeing if all could be killed somehow.
Attachment #8576295 - Flags: review?(jwalden+bmo) → review+
Comment on attachment 8576296 [details] [diff] [review]
part 2.  Remove the parent argument of NewNativeObjectWithGivenTaggedProto

Review of attachment 8576296 [details] [diff] [review]:
-----------------------------------------------------------------

If these functions really are unused, feel free to remove them.
Attachment #8576296 - Flags: review?(jwalden+bmo) → review+
Attachment #8576297 - Flags: review?(jwalden+bmo) → review+
> Maybe worth seeing if all could be killed somehow.

After bug 1142296 lands and removes a few more, we can think about it.

> If these functions really are unused, feel free to remove them.

They're unused, but I'm kinda assuming they got added for a reason....
You need to log in before you can comment on or make changes to this bug.