Closed
Bug 566077
Opened 15 years ago
Closed 15 years ago
Fix some small things Shark pointed out
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mrbkap, Assigned: mrbkap)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(4 files)
|
482 bytes,
text/html
|
Details | |
|
2.36 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
|
5.73 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
|
2.26 KB,
patch
|
jst
:
review+
|
Details | Diff | Splinter Review |
I sharked this testcase for a while aiming to remove anything XPC*.cpp. It turns out that XPCWrappedNative::GetWrappedNativeOfJSObject is pretty slow, especially in cases that we know for a fact that we have a wrapped native. Also: XPCWrappedNativeScope::FindInJSObjectScope is slow (it does a linear search through the list of scopes?!).
Most of the winnings from this testcase should come from another fix I'll look for later: setting window.x should call XPC_XOW_SetProperty -> nsWindowSH::SetProperty -> set a normal slot. Right now: we go XPC_XOW_SetProperty -> nsWindowSH::SetProperty -> nsWindowSH::SetProperty (via the JS engine, which takes a very non-trivial amount of time) -> nsEventReceiverSH::SetProperty.
Also note: we don't trace this testcase at all: setting window.x knocks us off trace anyway because the global object is special. This is a separate problem from security wrappers.
| Assignee | ||
Comment 1•15 years ago
|
||
nsXPConnect::GetWrapperForObject is way overkill when we're wrapping the global object for its own scope.
| Assignee | ||
Comment 2•15 years ago
|
||
CallContexts should only be needed when we're calling directly into C++ ourselves. Otherwise, we'll go into the engine, which will have to go through XPConnect anyway, which will create its own callcontext when it's needed.
Attachment #445508 -
Flags: review?(jst)
| Assignee | ||
Comment 3•15 years ago
|
||
PCWrappedNative::GetWrappedNativeOfJSObject is slow. If we already have a wrapped native (especially in hooks like {inner,outer}Object) we should just get the wrapped native directly.
Attachment #445509 -
Flags: review?(jst)
Updated•15 years ago
|
Version: 1.9.1 Branch → Trunk
Updated•15 years ago
|
Attachment #445507 -
Flags: review?(jst) → review+
Updated•15 years ago
|
Attachment #445508 -
Flags: review?(jst) → review+
Updated•15 years ago
|
Attachment #445509 -
Flags: review?(jst) → review+
Comment 4•15 years ago
|
||
could you land these on the TM tree?
| Assignee | ||
Comment 5•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/542a97d14871
http://hg.mozilla.org/tracemonkey/rev/52e046cb0317
http://hg.mozilla.org/tracemonkey/rev/be891c599b59
and bustage fix
http://hg.mozilla.org/tracemonkey/rev/f423fbc93e3f
I forgot to add the bug number to the commit messages, unfortunately :(
| Assignee | ||
Comment 6•15 years ago
|
||
The original title of this bug was way too grandiose (and wanted to be a tracking bug). I'll tackle other stuff in other bugs.
Summary: Get security wrappers out of hot paths → Fix some small things Shark pointed out
Whiteboard: fixed-in-tracemonkey
| Assignee | ||
Comment 7•15 years ago
|
||
This got pushed to m-c some time ago.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•