Closed
Bug 885800
Opened 11 years ago
Closed 11 years ago
Cu.isDeadWrapper() should unwrap CCWs
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: msucan, Unassigned)
Details
Attachments
(1 file)
2.41 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
Given compartments A, B and C, object O which lives in B, and a variable V in A that points to object O. B is nuked at some later point but V is still there, as a DeadObject. If you get V from C and you call Cu.isDeadWrapper(V) you get |false|. You only get |true| if you call Cu.isDeadWrapper(V) from A. We would need this to work from other compartments as well. Bobby Holley said the following in bug 883649 comment #14: > Once a wrapper is nuked, it ceases to become a wrapper at all. This means > that passing the nuked wrapper across compartment boundaries will end up > with a CCW to a DeadObjectProxy, rather than another DeadObjectProxy. > > If it would be helpful, we could make Cu.IsDeadWrapper unwrap CCWs, so if > would give the right answer here. If it would, please file a bug and CC me. ... in reply to bug 883649 comment 13.
Comment 1•11 years ago
|
||
Attachment #766106 -
Flags: review?(gkrizsanits)
Comment 2•11 years ago
|
||
Comment on attachment 766106 [details] [diff] [review] Unwrap CCWs in Cu.isDeadWrapper. v1 Review of attachment 766106 [details] [diff] [review]: ----------------------------------------------------------------- I don't really see why do you not just use the unchecked unwrap here, but since it's a Cu method, probably does not matter.
Attachment #766106 -
Flags: review?(gkrizsanits) → review+
Comment 3•11 years ago
|
||
(In reply to Gabor Krizsanits [:krizsa :gabor] (sick) from comment #2) > Comment on attachment 766106 [details] [diff] [review] > Unwrap CCWs in Cu.isDeadWrapper. v1 > > Review of attachment 766106 [details] [diff] [review]: > ----------------------------------------------------------------- > > I don't really see why do you not just use the unchecked unwrap here, but > since it's a Cu method, probably does not matter. We should always use CheckedUnwrap unless we have an explicit need for UncheckedUnwrap, since the latter is a a potential security risk. I'd like to minimize the MXR results for UncheckedUnwrap.
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ab82dbf50dd2
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•