Closed Bug 1468137 Opened 6 years ago Closed 6 years ago

Remove JS_Get*Prototype functions

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

(1 file)

In bug 1275315 bz added JS::GetRealm*Prototype APIs. We should use those instead of the JS_Get*Prototype functions: the GetRealm*Prototype APIs don't require an unnecessary object argument, there's no need to have two sets of very similar APIs for this, and it helps bug 1466112 by getting rid of some JSObject::global() calls.
Comment on attachment 8984788 [details] [diff] [review]
Remove JS_Get*Prototype APIs; use JS::GetRealm*Prototype instead

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

So, at least without directly considering realms, assertSameCompartment(cx, forObj); would already ensure we just need to check cx.
Attachment #8984788 - Flags: review?(evilpies) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/db248a2fb202
Remove JS_Get*Prototype APIs; use JS::GetRealm*Prototype instead. r=evilpie
https://hg.mozilla.org/mozilla-central/rev/db248a2fb202
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.

Attachment

General

Created:
Updated:
Size: