Closed Bug 1468406 Opened 6 years ago Closed 6 years ago

Remove JSObject::realm()

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(4 files)

Similar to bug 1468252, but for JSObject::realm() instead of JSObject::global().
Summary: Remove JSObject::realm → Remove JSObject::realm()
JSObject::globalForTracing and JSObject::isOwnGlobal can be inlined in JS_GlobalObjectTraceHook.

This removes a number of JSObject::realm() calls.
Attachment #8985376 - Flags: review?(jcoppeard)
Attachment #8985376 - Flags: review?(jcoppeard) → review+
Attachment #8985375 - Flags: review?(luke) → review+
Attachment #8985475 - Flags: review?(evilpies) → review+
This replaces the remaining realm() calls with either nonCCWRealm(), maybeCCWRealm(), or deprecatedRealm().
Attachment #8985626 - Flags: review?(luke)
Attachment #8985626 - Flags: review?(luke) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8695dbfdc556
part 1 - Add NativeObject::realm(), forwarding to JSObject::realm() for now. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/7c8ab030787b
part 2 - Simplify JS_GlobalObjectTraceHook. r=jonco
https://hg.mozilla.org/integration/mozilla-inbound/rev/db80d5a4d8e9
part 3 - Add some obj->as<Foo>() casts to eliminate some JSObject::realm() calls. r=evilpie
Keywords: leave-open
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/49cbcdeaa8bb
part 4 - Remove remaining JSObject::realm() calls. r=luke
Keywords: leave-open
Oops, some devtools orange because the nonCCWRealm call in DebuggerObject::unwrap is incorrect (not sure what I was thinking and I missed this on Try) - asked the sheriffs to back out and will reland later with s/nonCCWRealm/deprecatedRealm/ for now.
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/77b8ddea1fbd
part 4 - Remove remaining JSObject::realm() calls. r=luke
Flags: needinfo?(jdemooij)
https://hg.mozilla.org/mozilla-central/rev/77b8ddea1fbd
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.