gecko-dev/dom/performance
Eden Chuang 0943e68b5e Bug 1752856 - Null CheckedUnsafePtr<WorkerPrivate> for members of WorkerGlobalScope when releaseing WorkerPrivate. r=dom-worker-reviewers,asuth,smaug
In some unusual cases, WorkerGlobalScope could live longer than WorkerPrivate since some other objects hold a reference on WorkerGlobalScope. We try to use CC/GC to release WorkerGlobalScope and force disconnect them from the WorkerPrivate before releasing WorkerPrivate. https://searchfox.org/mozilla-central/rev/83b86005c6913c2062419efb8aabdf2e683aa47f/dom/workers/RuntimeService.cpp#2068-2109

The previous implementation focused on nulling the WorkerGlobalScopeBase::mWorkerPrivate. However, it is not enough since WorkerGlobalScope's member could possibly hold a CheckedUnsafePtr<WorkerPrivate>, i.e. WorkerGlobalScope::mPerformance.

In this patch, we focus on breaking these connections.

Differential Revision: https://phabricator.services.mozilla.com/D162575
2022-11-30 14:27:51 +00:00
..
tests Bug 1788037 - Turn on ESLint rule for prefer-boolean-length-check for dom. r=asuth,karlt 2022-09-02 11:05:17 +00:00
EventCounts.cpp
EventCounts.h Bug 1777574, automate CC zone handling, r=mccr8 2022-09-07 11:22:51 +00:00
moz.build Bug 1752856 - Null CheckedUnsafePtr<WorkerPrivate> for members of WorkerGlobalScope when releaseing WorkerPrivate. r=dom-worker-reviewers,asuth,smaug 2022-11-30 14:27:51 +00:00
Performance.cpp Bug 1778510: Improve the comment on a short-circuit check we still haven't solved r=sefeng 2022-11-29 13:34:19 +00:00
Performance.h Bug 1778510: Change Performance objects from taking SystemPrincipal bool to a Timer Caller Type r=sefeng,asuth 2022-11-29 13:34:19 +00:00
PerformanceEntry.cpp
PerformanceEntry.h Bug 1777574, automate CC zone handling, r=mccr8 2022-09-07 11:22:51 +00:00
PerformanceEventTiming.cpp
PerformanceEventTiming.h Bug 1778510: Cut over a bunch of performance time precision calls to use the new calling convention r=sefeng 2022-11-29 13:34:19 +00:00
PerformanceMainThread.cpp Bug 1778510: Cut over a bunch of performance time precision calls to use the new calling convention r=sefeng 2022-11-29 13:34:19 +00:00
PerformanceMainThread.h Bug 1778510: Change Performance objects from taking SystemPrincipal bool to a Timer Caller Type r=sefeng,asuth 2022-11-29 13:34:19 +00:00
PerformanceMark.cpp Bug 1772417 - align IsPerformanceTimingAttribute to user-timing spec. r=sefeng 2022-08-18 21:18:24 +00:00
PerformanceMark.h
PerformanceMeasure.cpp
PerformanceMeasure.h
PerformanceNavigation.cpp
PerformanceNavigation.h Bug 1777574, automate CC zone handling, r=mccr8 2022-09-07 11:22:51 +00:00
PerformanceNavigationTiming.cpp Bug 1778510: Cut over a bunch of performance time precision calls to use the new calling convention r=sefeng 2022-11-29 13:34:19 +00:00
PerformanceNavigationTiming.h
PerformanceObserver.cpp Bug 1777574, automate CC zone handling, r=mccr8 2022-09-07 11:22:51 +00:00
PerformanceObserver.h Bug 1777574, automate CC zone handling, r=mccr8 2022-09-07 11:22:51 +00:00
PerformanceObserverEntryList.cpp
PerformanceObserverEntryList.h Bug 1777574, automate CC zone handling, r=mccr8 2022-09-07 11:22:51 +00:00
PerformancePaintTiming.cpp Bug 1778510: Cut over a bunch of performance time precision calls to use the new calling convention r=sefeng 2022-11-29 13:34:19 +00:00
PerformancePaintTiming.h
PerformanceResourceTiming.cpp
PerformanceResourceTiming.h
PerformanceServerTiming.cpp
PerformanceServerTiming.h Bug 1777574, automate CC zone handling, r=mccr8 2022-09-07 11:22:51 +00:00
PerformanceService.cpp
PerformanceService.h
PerformanceStorage.h
PerformanceStorageWorker.cpp
PerformanceStorageWorker.h Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato 2022-08-03 16:39:41 +00:00
PerformanceTiming.cpp Bug 1778510: Cut over a bunch of performance time precision calls to use the new calling convention r=sefeng 2022-11-29 13:34:19 +00:00
PerformanceTiming.h No bug: apply code formatting via Lando 2022-11-29 13:46:10 +00:00
PerformanceTimingTypes.ipdlh
PerformanceWorker.cpp Bug 1752856 - Null CheckedUnsafePtr<WorkerPrivate> for members of WorkerGlobalScope when releaseing WorkerPrivate. r=dom-worker-reviewers,asuth,smaug 2022-11-30 14:27:51 +00:00
PerformanceWorker.h Bug 1752856 - Null CheckedUnsafePtr<WorkerPrivate> for members of WorkerGlobalScope when releaseing WorkerPrivate. r=dom-worker-reviewers,asuth,smaug 2022-11-30 14:27:51 +00:00