Closed
Bug 1083232
Opened 10 years ago
Closed 10 years ago
Does FrameState really need to refcount the principals?
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Seems to me like the FrameState has C-stack-lifetime and during its lifetime the principals are kept alive by the JS callstack that we're walking.... So we shouldn't need to hold/drop them in FrameState() and ~FrameState().
Comment 1•10 years ago
|
||
+1 let's drop the drops.
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8505957 -
Flags: review?(nfitzgerald)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 3•10 years ago
|
||
Comment on attachment 8505957 [details] [diff] [review] Don't refcount the principals in FrameState, since it has stack lifetime and the principals will be kept alive by the JS stack while he FrameState is alive Review of attachment 8505957 [details] [diff] [review]: ----------------------------------------------------------------- Might be worth a short comment blurb explaining why we don't need to hold principals, for the inquisitive reader of the future. Again, note that I'm not a SpiderMonkey peer.
Attachment #8505957 -
Flags: review?(nfitzgerald) → review+
Assignee | ||
Comment 4•10 years ago
|
||
Added a note in the header: // Note: we don't have to hold/drop principals, because we're // only alive while the stack is being walked and during this // time the principals are kept alive by the stack itself. As far as peerness, I think we're OK; jimb was ok with this as well, for example. And you're the domain expert on this code anyway.
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/01d25edea2bc
Target Milestone: --- → mozilla36
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/01d25edea2bc
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•