Closed Bug 1142304 Opened 9 years ago Closed 9 years ago

Remove the parent argument from NewObjectWithGivenTaggedProto

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

      No description provided.
Depends on: 1142309
Blocks: 1142864
Comment on attachment 8577375 [details] [diff] [review]
Remove the parent argument from NewObjectWithGivenTaggedProto

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

::: js/src/jsobj.cpp
@@ +1233,1 @@
>      if (isCachable) {

I'd get rid of the bool variable, if indeed it's assigned, tested, then ignored as appears likely from patch context.

@@ +1251,2 @@
>  
>      RootedObject obj(cxArg, NewObject(cxArg, group, parent, allocKind, newKind));

Could just pass in cxArg->global().
Attachment #8577375 - Flags: review?(jwalden+bmo) → review+
> I'd get rid of the bool variable, if indeed it's assigned, tested, then ignored

It's not ignored.  If it's true we try the cache lookup, and if that succeeds we create an object based on the cached info, which I assume is faster or something.

> Could just pass in cxArg->global().

Sure, but that arg goes away anyway in bug 1142864.
https://hg.mozilla.org/mozilla-central/rev/74e1b16ef4e3
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: