UnwrapProxy is slow

RESOLVED FIXED in mozilla21

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

(Blocks: 1 bug)

unspecified
mozilla21
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

In particular, it does xpc::WrapperFactory::IsXrayWrapper, which actually goes and does UnwrapObject (out of line, natch) and all sorts of crud like that.

And some of the places we're calling it (e.g. getElementIfPresent, get) we already asserted !IsXrayWrapper.

And some other places (finalize) we had better be able to assert it.

Peter, are there other places we can assert it too?  Presumably not getOwnPropertyDescriptor, right?  What other hooks do Xrays call?
Created attachment 666531 [details] [diff] [review]
Initial cut at making this better, doesn't cover all callsites
Based on recent discussions with waldo, it sounds like I shouldn't be assuming that xrays will only call getOwnPropertyDescriptor... Which means I do need to keep doing conditional unwrap in all the hooks.  :(

I can at least make it not do random out of line calls, though.
Created attachment 698761 [details] [diff] [review]
Speed up UnwrapProxy, since we know what we have there is either an Xray or our proxy.
Attachment #698761 - Flags: review?(peterv)
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Attachment #698761 - Flags: review?(peterv) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/19b9f064d8eb
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla21
https://hg.mozilla.org/mozilla-central/rev/f68f04e1fa23
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.