Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth

This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
This commit is contained in:
Emilio Cobos Álvarez 2022-03-17 19:06:51 +00:00
Родитель c5917ed65a
Коммит 2b25e0298a
17 изменённых файлов: 31 добавлений и 3 удалений

Просмотреть файл

@ -8,8 +8,10 @@
#include "AbortSignal.h"
#include "js/Value.h"
#include "mozilla/dom/AbortControllerBinding.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/DOMException.h"
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/HoldDropJSObjects.h"
namespace mozilla::dom {

Просмотреть файл

@ -29,6 +29,7 @@
#include "nsIStreamLoader.h"
#include "nsNetUtil.h"
#include "nsProxyRelease.h"
#include "nsIInputStream.h"
// Undefine the macro of CreateFile to avoid FileCreatorHelper#CreateFile being
// replaced by FileCreatorHelper#CreateFileW.

Просмотреть файл

@ -19,7 +19,9 @@
#include "mozilla/dom/WorkerRunnable.h"
#include "mozilla/Maybe.h"
#include "mozilla/ScopeExit.h"
#include "mozilla/Services.h"
#include "mozilla/Unused.h"
#include "nsIObserverService.h"
#include "nsProxyRelease.h"
#include "nsStreamUtils.h"

Просмотреть файл

@ -8,7 +8,11 @@
#include "js/SavedFrameAPI.h"
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/Services.h"
#include "nsJSPrincipals.h"
#include "nsIObserverService.h"
#include "xpcpublic.h"
namespace mozilla::dom {

Просмотреть файл

@ -80,6 +80,7 @@
#include "mozilla/dom/XrayExpandoClass.h"
#include "mozilla/dom/WindowProxyHolder.h"
#include "ipc/ErrorIPCUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "mozilla/dom/DocGroup.h"
#include "nsXULElement.h"

Просмотреть файл

@ -27,6 +27,7 @@
#include "mozilla/dom/WorkletGlobalScope.h"
#include "mozilla/dom/WorkletImpl.h"
#include "mozilla/dom/WorkletThread.h"
#include "mozilla/dom/RootedDictionary.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/HoldDropJSObjects.h"
#include "mozilla/JSObjectHolder.h"

Просмотреть файл

@ -21,6 +21,7 @@
#include "mozilla/dom/WebCryptoTask.h"
#include "mozilla/dom/WorkerRef.h"
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/dom/RootedDictionary.h"
// Template taken from security/nss/lib/util/templates.c
// This (or SGN_EncodeDigestInfo) would ideally be exported

Просмотреть файл

@ -20,6 +20,7 @@
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/dom/WorkerRunnable.h"
#include "mozilla/dom/WindowContext.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"
#include "mozilla/Unused.h"
#ifdef MOZ_DOM_STREAMS

Просмотреть файл

@ -22,6 +22,7 @@
#include "mozilla/dom/ErrorEvent.h"
#include "mozilla/dom/ErrorEventBinding.h"
#include "mozilla/dom/WorkerScope.h"
#include "mozilla/dom/RootedDictionary.h"
#include "mozilla/dom/quota/ResultExtensions.h"
#include "mozilla/intl/LocaleCanonicalizer.h"
#include "mozilla/ipc/BackgroundChild.h"

Просмотреть файл

@ -8,6 +8,7 @@
#include "LockRequestChild.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/RemoteWorkerChild.h"
#include "mozilla/dom/WindowGlobalChild.h"
#include "mozilla/dom/WorkerCommon.h"
#include "mozilla/dom/WorkerPrivate.h"

Просмотреть файл

@ -15,6 +15,7 @@
#include "mozilla/dom/PushSubscription.h"
#include "mozilla/dom/PushSubscriptionOptionsBinding.h"
#include "mozilla/dom/PushUtil.h"
#include "mozilla/dom/RootedDictionary.h"
#include "mozilla/dom/WorkerRunnable.h"
#include "mozilla/dom/WorkerScope.h"

Просмотреть файл

@ -11,6 +11,7 @@
#include "mozilla/dom/Notification.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/PushManager.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"
#include "mozilla/dom/ServiceWorker.h"
#include "mozilla/dom/ServiceWorkerRegistrationBinding.h"
#include "mozilla/dom/ServiceWorkerUtils.h"

Просмотреть файл

@ -6,6 +6,7 @@
#include "ChromeWorker.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/WorkerBinding.h"
#include "nsContentUtils.h"
#include "WorkerPrivate.h"

Просмотреть файл

@ -8,6 +8,7 @@
#include "mozilla/dom/MessageEvent.h"
#include "mozilla/dom/MessageEventBinding.h"
#include "mozilla/dom/RootedDictionary.h"
#include "mozilla/TimelineConsumers.h"
#include "mozilla/WorkerTimelineMarker.h"
#include "nsQueryObject.h"

Просмотреть файл

@ -7,6 +7,7 @@
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/MessageEvent.h"
#include "mozilla/dom/MessageEventBinding.h"
#include "mozilla/dom/RemoteWorkerChild.h"
#include "mozilla/dom/WindowContext.h"
#include "mozilla/AbstractThread.h"
#include "mozilla/PerformanceUtils.h"

Просмотреть файл

@ -10,10 +10,12 @@
#include "mozilla/dom/JSExecutionManager.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPtr.h"
#include "WorkerDebugger.h"
#include "WorkerPrivate.h"
#include "nsIObserverService.h"
namespace mozilla {
namespace dom {

Просмотреть файл

@ -28,7 +28,6 @@
#include "mozilla/UseCounter.h"
#include "mozilla/dom/ClientSource.h"
#include "mozilla/dom/FlippedOnce.h"
#include "mozilla/dom/RemoteWorkerChild.h"
#include "mozilla/dom/quota/CheckedUnsafePtr.h"
#include "mozilla/dom/Worker.h"
#include "mozilla/dom/WorkerCommon.h"
@ -36,6 +35,7 @@
#include "mozilla/dom/WorkerStatus.h"
#include "mozilla/dom/workerinternals/JSSettings.h"
#include "mozilla/dom/workerinternals/Queue.h"
#include "mozilla/dom/JSExecutionManager.h"
#include "mozilla/StaticPrefs_extensions.h"
#include "nsContentUtils.h"
#include "nsIChannel.h"
@ -46,10 +46,16 @@
class nsIThreadInternal;
namespace JS {
struct RuntimeStats;
}
namespace mozilla {
class ThrottledEventQueue;
namespace dom {
class RemoteWorkerChild;
// If you change this, the corresponding list in nsIWorkerDebugger.idl needs
// to be updated too. And histograms enum for worker use counters uses the same
// order of worker kind. Please also update dom/base/usecounters.py.
@ -1418,8 +1424,8 @@ class WorkerPrivate final
// We expose some extra testing functions in that case.
bool mIsInAutomation;
const RefPtr<mozilla::PerformanceCounter> mPerformanceCounter =
MakeRefPtr<mozilla::PerformanceCounter>(nsPrintfCString(
const RefPtr<PerformanceCounter> mPerformanceCounter =
MakeRefPtr<PerformanceCounter>(nsPrintfCString(
"Worker:%s", NS_ConvertUTF16toUTF8(mWorkerName).get()));
nsString mId;