Closed Bug 1181869 Opened 5 years ago Closed 5 years ago

Make Bindings use the normal Rooted infrastructure

Categories

(Core :: JavaScript: GC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: terrence, Assigned: terrence)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It's currently using the wonky InternalHandle thing because we wanted to avoid a bunch of extraneous stack copies. What I didn't realize at the time is that the actual Binding* is external, so the struct itself is a svelt 40 bytes. Copying these to and from the stack is not ruinous at all, allows us to use normal Rooted techniques, and will allow us to remove InternalHandle.
Attachment #8631635 - Flags: review?(shu)
Comment on attachment 8631635 [details] [diff] [review]
cleanup_bindings_rooting-v0.diff

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

This is a nice cleanup.

My only dislike is that almost always we pull the Bindings out only to copy it back into JSScript, largely due to this temporary vs script storage nonsense. It'd be nice to clean that up so we have some stack-allocated Bindings that get copied to script storage wholesale instead of having its "storage switched".

If we don't switch that soon, it would be nice to have some RAII thing that combines the rooting + copying back into JSScript.
Attachment #8631635 - Flags: review?(shu) → review+
https://hg.mozilla.org/mozilla-central/rev/d588ff0a68d9
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Status: RESOLVED → REOPENED
Flags: needinfo?(terrence)
Resolution: FIXED → ---
No change after backout. The regression appears to be noise.
Flags: needinfo?(terrence)
https://hg.mozilla.org/mozilla-central/rev/de6a79687e70
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.