Closed Bug 1017425 Opened 10 years ago Closed 10 years ago

Consider making window.performance StoreInSlot

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

To make performance.now() faster.
Attached patch Fix, for when we can actually land this (obsolete) (deleted) — Splinter Review
Attachment #8430541 - Flags: review?(peterv)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment on attachment 8430541 [details] [diff] [review]
Fix, for when we can actually land this

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

::: dom/base/nsGlobalWindow.cpp
@@ +2346,5 @@
>    // document.
>    mDoc = aDocument;
>    if (IsInnerWindow() && IsDOMBinding()) {
>      WindowBinding::ClearCachedDocumentValue(cx, this);
> +    WindowBinding::ClearCachedPerformanceValue(cx, this);

Might be worth extracting this to a nsGlobalWindow::ClearSlots(...)?
Attachment #8430541 - Flags: review?(peterv) → review+
> Might be worth extracting this to a nsGlobalWindow::ClearSlots(...)?

How about ClearDocumentDependentSlots()?
Flags: needinfo?(peterv)
Sure.
Flags: needinfo?(peterv)
Olli, do this bug we need to make the "performance" getter non-throwing.  That basically means backing out bug 1025078 and replacing it with the changes in this bug (to return null and null-check in console code).  Any objections?
Flags: needinfo?(bugs)
Returning null in those very odd cases sounds ok to me.
Flags: needinfo?(bugs)
Attachment #8430541 - Attachment is obsolete: true
I filed bug 1063879 on making this faster on Worker too.
Attached patch Patch merged to tip again (deleted) — Splinter Review
Attachment #8448770 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/fc2a4c5ac088
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
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: