Closed Bug 1155984 Opened 9 years ago Closed 9 years ago

Improve the performance of "self" in windows and workers

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(3 files)

It's kinda slow right now, for no good reason.
Attached file Script for testcase
Attached file Testcase
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+
https://hg.mozilla.org/mozilla-central/rev/c2c74fe15d1e
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: