Improve the performance of "self" in windows and workers

RESOLVED FIXED in Firefox 40

Status

()

Core
DOM
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla40
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(3 attachments)

It's kinda slow right now, for no good reason.
Created attachment 8594342 [details]
Script for testcase
Created attachment 8594343 [details]
Testcase
Created attachment 8594344 [details] [diff] [review]
Improve the performance of the "self" getter in both window and workers

Jason, could you review the Class.h change?

Peter, I could also make self on Window be Cached, not StoreInSlot, for a bit less complexity, but also a tiny bit slower code
Attachment #8594344 - Flags: review?(peterv)
Attachment #8594344 - Flags: review?(jorendorff)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8594344 [details] [diff] [review]
Improve the performance of the "self" getter in both window and workers

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

::: dom/base/nsGlobalWindow.cpp
@@ +2625,5 @@
> +      if (!JS_GetProperty(cx, newInnerGlobal, "self", &unused)) {
> +        NS_ERROR("can't create the 'self' property");
> +        return NS_ERROR_FAILURE;
> +      }
> +

No need for this blank line.
Attachment #8594344 - Flags: review?(peterv) → review+
Comment on attachment 8594344 [details] [diff] [review]
Improve the performance of the "self" getter in both window and workers

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

Sure.
Attachment #8594344 - Flags: review?(jorendorff) → review+

Comment 6

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c2c74fe15d1e
https://hg.mozilla.org/mozilla-central/rev/c2c74fe15d1e
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.