Closed
Bug 562193
Opened 15 years ago
Closed 15 years ago
Implement Components.utils.getGlobalForObject(obj)
Categories
(Core :: XPConnect, enhancement)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
(Keywords: dev-doc-complete, Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
3.10 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
With __parent__ going away soon, we should provide a better, simpler alternative to support this reasonable use of it.
Assignee | ||
Comment 1•15 years ago
|
||
Manual test fodder used to check outerization correctness (success condition: not asserting about inner windows in equality hooks), as typed into the JavaScript console:
var wm = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator); var enumerator = wm.getEnumerator("navigator:browser"); var win = enumerator.getNext(); var doc = win.gBrowser.contentDocument; doc.defaultView === Components.utils.getGlobalForObject(doc.documentElement); var dv = doc.defaultView; var ggfo = Components.utils.getGlobalForObject(doc.documentElement); Components.utils.getGlobalForObject(dv.eval("(function foo(){})")) === ggfo
Attachment #442170 -
Flags: review?(mrbkap)
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #442170 -
Attachment is obsolete: true
Attachment #442174 -
Flags: review?(mrbkap)
Attachment #442170 -
Flags: review?(mrbkap)
Updated•15 years ago
|
Attachment #442174 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 3•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/16f1064de17e
I have a brief blog post queued up on the new method, which I'll make live once this migrates over to m-c. I'll try to add a writeup to MDC in a bit when the site's less flaky and unreachable.
Assignee | ||
Updated•15 years ago
|
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 4•15 years ago
|
||
https://developer.mozilla.org/en/Components.utils.getGlobalForObject
Linked from the Components and Components.utils pages, needs to be added to what's-new pages of whatever sort so leaving the d-d-n keyword...
Comment 5•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 6•15 years ago
|
||
Minor tweaks made to Jeff's doc, and it's been listed where appropriate.
https://developer.mozilla.org/en/Components.utils.getGlobalForObject
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•