Closed Bug 1359093 Opened 4 years ago Closed 4 years ago

Inline the ToWindowProxyIfWindow is-global check

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qf])

Attachments

(1 file)

Attached patch PatchSplinter Review
Proxy::get and Proxy::set call ToWindowProxyIfWindow. This patch adds the fast path we have for IsWindow also to ToWindowProxyIfWindow, so we can inline the non-global case.

Having that call is still sad because JS code should never pass a Window directly, but at least the overhead is much smaller now.
Attachment #8861000 - Flags: review?(evilpies)
Attachment #8861000 - Flags: review?(evilpies) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3e76637092bf
Inline the ToWindowProxyIfWindow is-global check. r=evilpie
https://hg.mozilla.org/mozilla-central/rev/3e76637092bf
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.