Closed
Bug 976938
Opened 11 years ago
Closed 11 years ago
Add a way to go from an Xray's method to the global of the underlying object
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: bzbarsky, Assigned: bholley)
References
Details
Attachments
(1 file, 1 obsolete file)
4.47 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
This is needed for bug 976305.
Assignee | ||
Comment 1•11 years ago
|
||
Naming isn't great, but I really couldn't come up with something better.
Attachment #8383426 -
Flags: review?(bzbarsky)
![]() |
Reporter | |
Comment 2•11 years ago
|
||
Comment on attachment 8383426 [details] [diff] [review]
Add a way to identify the Xray parent (if any) of a given function. v1
> JS::Rooted<JSObject*> global(cx, JS_GetGlobalForObject(cx, wrapper));
This is unused after this patch. Nix it?
>+XrayFunctionParentOrNull(JSObject *fun)
In practice, what we will always want is the callee global, right? Would it make sense to just have an XrayAwareCalleeGlobal API that does that?
If we do want the API that returns the Xray itself, I can live with this naming.
Also, I really hope this method is reasonably fast, since we'll need to sprinkle it about. :(
Attachment #8383426 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8383426 -
Attachment is obsolete: true
Attachment #8384891 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 4•11 years ago
|
||
![]() |
Reporter | |
Comment 5•11 years ago
|
||
Comment on attachment 8384891 [details] [diff] [review]
Add a way to identify the Xray parent (if any) of a given function. v2
We should document that the return value of XrayAwareCalleeGlobal may not be same-compartment with the argument, just to make it clear.
r=me
Attachment #8384891 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•