Closed Bug 1017425 Opened 11 years ago Closed 11 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

Details

Attachments

(1 file, 2 obsolete files)

To make performance.now() faster.
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.
Attachment #8448770 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 11 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: