Closed Bug 909866 Opened 11 years ago Closed 11 years ago

Fix an exact rooting hazard in JSCompartment::wrap

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: terrence, Assigned: terrence)

References

Details

Attachments

(1 file)

This appears to simply be missing a root.
Attachment #796155 - Flags: review?(sphink)
Comment on attachment 796155 [details] [diff] [review]
hazard_wrap-v0.diff

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

I vaguely wonder if this was a real hazard -- is the old value of str ever used within wrap()? Not that it matters.

Someday, we'll be able to update wrap() to take a handle. I remember looking briefly and deciding to do something else.
Attachment #796155 - Flags: review?(sphink) → review+
(In reply to Steve Fink [:sfink] from comment #1)
> 
> I vaguely wonder if this was a real hazard -- is the old value of str ever
> used within wrap()? Not that it matters.

Good question! I assumed that string wrapping could trigger GC, even if just from error reporting. I'm not sure how much it matters in this specific case.
 
> Someday, we'll be able to update wrap() to take a handle. I remember looking
> briefly and deciding to do something else.

Likewise.
https://hg.mozilla.org/mozilla-central/rev/2308ce99493c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: