Closed
Bug 1070696
Opened 10 years ago
Closed 10 years ago
Improve native global ergonomics a bit
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: bholley, Assigned: bholley)
Details
Attachments
(2 files)
20.41 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
2.72 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
There are various inconveniences that have been bothering me. I was going to wait until jimb's refactoring in bug 971673 was done before doing this, but that's been taking a while and this stuff is easy to fix.
Assignee | ||
Comment 1•10 years ago
|
||
The method is infallible, and making the callers invoke js::GetGlobalForObjectCrossCompartment manually is dumb.
Attachment #8492732 -
Flags: review?(bugs)
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8492733 -
Flags: review?(bugs)
Comment 3•10 years ago
|
||
Comment on attachment 8492733 [details] [diff] [review] Part 2 - Implement a JSObject* override to AutoJSAPI::Init(). v1 >+ // This is a helper that grabs the native global associated with aGlobalObject aObject, not aGlobalObject
Attachment #8492733 -
Flags: review?(bugs) → review+
Comment 4•10 years ago
|
||
Comment on attachment 8492732 [details] [diff] [review] Part 1 - Rename xpc::GetNativeForGlobal to xpc::NativeGlobal and make it accept non-global JSObjects. v1 > /** >+ * Returns the nsIGlobalObject corresponding to |aObjs|'s JS global. >+ */ >+nsIGlobalObject * >+NativeGlobal(JSObject *aObj); nsIGlobalObject* NativeGlobal(JSObject* aObj); would follow Mozilla coding style, but xpconnect has some unusual rules.
Attachment #8492732 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•10 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/e1f3be2c48f6 remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/cafe6d84215b
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e1f3be2c48f6 https://hg.mozilla.org/mozilla-central/rev/cafe6d84215b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•