Closed Bug 1479712 Opened Last year Closed Last year

Remove more JSAutoRealmAllowCCW uses in XPConnect

Categories

(Core :: XPConnect, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(5 files)

No description provided.
This is green on (Linux64) Try. Part 3 could use a careful review, it's possible I'm missing something under JSObject2NativeInterface.
Attachment #8996243 - Flags: review?(bobbyholley) → review+
Attachment #8996244 - Flags: review?(bobbyholley) → review+
Comment on attachment 8996245 [details] [diff] [review]
Part 3 - Remove unnecessary AutoJSContext and JSAutoRealmAllowCCW in JSObject2NativeInterface and nsXPConnect::WrapJS

Review of attachment 8996245 [details] [diff] [review]:
-----------------------------------------------------------------

Note that these changes aren't as innocent as they seem, because instantiating an AutoJSContext and entering a compartment affects the subject principal, so things like nsContentUtils::IsCallerChrome() might return different results. That said, it looks like neither of these sites call into arbitrary stuff, so this should be ok. Just something to be aware of.
Attachment #8996245 - Flags: review?(bobbyholley) → review+
Attachment #8996246 - Flags: review?(bobbyholley) → review+
Attachment #8996283 - Flags: review?(bobbyholley) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7acb1055fd98
part 1 - Require a plain function in xpcshell setInterruptCallback. r=bholley
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f054516b7bb
part 2 - Remove unused nsIXPConnect.getWrappedNativePrototype. r=bholley
https://hg.mozilla.org/integration/mozilla-inbound/rev/368471d4f669
part 3 - Remove unnecessary AutoJSContext and JSAutoRealmAllowCCW in JSObject2NativeInterface and nsXPConnect::WrapJS. r=bholley
https://hg.mozilla.org/integration/mozilla-inbound/rev/e8231fa203a9
part 4 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in NativeInterface2JSObject. r=bholley
https://hg.mozilla.org/integration/mozilla-inbound/rev/43fb091672e7
part 5 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in xpc::StackScopedClone. r=bholley
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.