Closed Bug 1897400 Opened 1 year ago Closed 1 year ago

Move mWindow out of TimeoutManager, in order to reuse it for the Workers case (refactor)

Categories

(Core :: DOM: Workers, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: aiunusov, Assigned: aiunusov)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/source/dom/base/TimeoutManager.cpp#198,247,343,354,386,400,413,442-443,462,486,508,525,586,611-612,644,719,806-807,854,917,930,994,1110,1170

Possible solutions:
1 put them into https://searchfox.org/mozilla-central/source/dom/base/nsIGlobalObject.h
2 create hierarchy of TimeoutManager classes (i.e.: generic TimeoutManager with the specialization for the window and worker cases)

Assignee: nobody → aiunusov
Attachment #9402915 - Attachment description: WIP: Bug 1897400 - make mWindow to be a RefPtr → WIP: Bug 1897400 - Move mWindow out of TimeoutManager, in order to reuse it for the Workers case

Affected methods:

WindowID ()
GetExtantDoc ()
IsDocumentLoaded ()
GetBrowsingContextGroup ()
GetContextInternal ()
IsSuspended ()
IsFrozen ()
IsDying ()
HasActiveIndexedDBDatabases ()
HasActivePeerConnections ()
HasOpenWebSockets ()
IsChromeWindow ()
IsPlayingAudio ()
IsBackgroundInternal ()

Attachment #9402915 - Attachment description: WIP: Bug 1897400 - Move mWindow out of TimeoutManager, in order to reuse it for the Workers case → Bug 1897400 - Move mWindow out of TimeoutManager, in order to reuse it for the Workers case, r=smaug
Attachment #9402915 - Attachment description: Bug 1897400 - Move mWindow out of TimeoutManager, in order to reuse it for the Workers case, r=smaug → WIP: Bug 1897400 - Move mWindow out of TimeoutManager, in order to reuse it for the Workers case, r=smaug
Attachment #9402915 - Attachment description: WIP: Bug 1897400 - Move mWindow out of TimeoutManager, in order to reuse it for the Workers case, r=smaug → WIP: Bug 1897400 - change the type for mWindow to from nsGlobalWindowInner to nsIGlobalObject, in order to reuse TimeoutManager for the workers case in the future, r=smaug
Attachment #9402915 - Attachment description: WIP: Bug 1897400 - change the type for mWindow to from nsGlobalWindowInner to nsIGlobalObject, in order to reuse TimeoutManager for the workers case in the future, r=smaug → Bug 1897400 - prepare TimeoutManager for reuse in workers via nsIGlobalObject, r=smaug
Pushed by aiunusov@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f479ecc1133d prepare TimeoutManager for reuse in workers via nsIGlobalObject, r=smaug

Backed out for causing build bustages TimeoutManager.cpp

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/dom/base/TimeoutManager.cpp(687,3): error: Unused "kungFuDeathGrip" 'RefPtr<nsIGlobalObject>' objects constructed from temporary values are prohibited
Flags: needinfo?(aiunusov)

this was intentional, from the existing code.
But I will try to avoid it

Flags: needinfo?(aiunusov)
Pushed by aiunusov@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eba0d1690226 prepare TimeoutManager for reuse in workers via nsIGlobalObject, r=smaug
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: