Closed
Bug 613315
Opened 14 years ago
Closed 13 years ago
Cu.getGlobalForObject should unwrap wrappers
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
DUPLICATE
of bug 736316
People
(Reporter: Gavin, Unassigned)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
Using Cu.getGlobalForObject on wrappers seems to produce very strange results, e.g. returning the current global (of the wrapper?) rather than the global of the underlying object.
mrbkap suggests that nsXPCComponents_Utils::GetGlobalForObject() needs to do some unwrapping magic before just calling into JS_GetGlobalForObject.
Comment 1•14 years ago
|
||
...And then re-wrapping afterwards, of course.
Cc-ing Waldo since this is his baby. Also I want to ask him to consider the ramifications for removing JSObject::parent when fixing this. :)
Reporter | ||
Comment 2•14 years ago
|
||
This seems to get me the behavior that I want. I don't understand the security implications of this, or what the "re-wrapping" from comment 1 would entail, though.
Reporter | ||
Comment 3•14 years ago
|
||
This is mostly guesswork :)
Attachment #492173 -
Attachment is obsolete: true
Attachment #492281 -
Flags: feedback?(jwalden+bmo)
Reporter | ||
Updated•14 years ago
|
Attachment #492281 -
Flags: feedback?(mrbkap)
Comment 4•14 years ago
|
||
Comment on attachment 492281 [details] [diff] [review]
strawman, v2
Seems reasonable. I assume none of the methods here are fallible so as to need testing for null return or something? (I didn't look.)
Attachment #492281 -
Flags: feedback?(jwalden+bmo) → feedback+
Reporter | ||
Updated•14 years ago
|
Attachment #492281 -
Flags: feedback?(mrbkap) → review?(mrbkap)
Comment 5•14 years ago
|
||
Comment on attachment 492281 [details] [diff] [review]
strawman, v2
Looks good, thanks.
Attachment #492281 -
Flags: review?(mrbkap) → review+
Reporter | ||
Comment 6•14 years ago
|
||
Attachment #492281 -
Attachment is obsolete: true
Comment 7•13 years ago
|
||
I'm pretty sure I fixed this over in bug 736316.
Reporter | ||
Comment 8•13 years ago
|
||
sure looks like it!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•