# HG changeset patch # User Andrea Marchesini # Date 1517589328 -3600 # Node ID d4054ba468780794d9c207715f3d27a3fe12c6bb # Parent adf271d16489c3d096b98c69115652853ad23df6 Bug 1435197 - Reduce the number of headers included in WorkerCommon.h, r=smaug diff --git a/dom/serviceworkers/ServiceWorkerDescriptor.h b/dom/serviceworkers/ServiceWorkerDescriptor.h --- a/dom/serviceworkers/ServiceWorkerDescriptor.h +++ b/dom/serviceworkers/ServiceWorkerDescriptor.h @@ -1,16 +1,18 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef _mozilla_dom_ServiceWorkerDescriptor_h #define _mozilla_dom_ServiceWorkerDescriptor_h +#include "nsString.h" + class nsIPrincipal; namespace mozilla { namespace ipc { class PrincipalInfo; } // namespace ipc diff --git a/dom/workers/RuntimeService.h b/dom/workers/RuntimeService.h --- a/dom/workers/RuntimeService.h +++ b/dom/workers/RuntimeService.h @@ -8,16 +8,17 @@ #define mozilla_dom_workers_runtimeservice_h__ #include "mozilla/dom/WorkerCommon.h" #include "nsIObserver.h" #include "mozilla/dom/BindingDeclarations.h" #include "mozilla/dom/workerinternals/JSSettings.h" +#include "mozilla/Mutex.h" #include "nsClassHashtable.h" #include "nsHashKeys.h" #include "nsTArray.h" class nsITimer; class nsPIDOMWindowInner; namespace mozilla { diff --git a/dom/workers/WorkerCommon.h b/dom/workers/WorkerCommon.h --- a/dom/workers/WorkerCommon.h +++ b/dom/workers/WorkerCommon.h @@ -4,40 +4,23 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_dom_workers_WorkerCommon_h #define mozilla_dom_workers_WorkerCommon_h #include "jsapi.h" #include "mozilla/Attributes.h" -#include "mozilla/Maybe.h" -#include "mozilla/Mutex.h" -#include "nsAutoPtr.h" -#include "nsCOMPtr.h" -#include "nsString.h" -#include "nsTArray.h" - #include "mozilla/dom/ServiceWorkerDescriptor.h" -class nsIGlobalObject; class nsPIDOMWindowInner; namespace mozilla { namespace dom { -// If you change this, the corresponding list in nsIWorkerDebugger.idl needs to -// be updated too. -enum WorkerType -{ - WorkerTypeDedicated, - WorkerTypeShared, - WorkerTypeService -}; - class WorkerPrivate; namespace workers { // All of these are implemented in RuntimeService.cpp #ifdef DEBUG void diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h --- a/dom/workers/WorkerPrivate.h +++ b/dom/workers/WorkerPrivate.h @@ -5,20 +5,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_dom_workers_workerprivate_h__ #define mozilla_dom_workers_workerprivate_h__ #include "mozilla/dom/WorkerCommon.h" #include "mozilla/CondVar.h" #include "mozilla/DOMEventTargetHelper.h" -#include "nsDOMNavigationTiming.h" #include "nsIContentSecurityPolicy.h" #include "nsIEventTarget.h" -#include "nsThreadUtils.h" #include "nsTObserverArray.h" #include "mozilla/dom/WorkerHolder.h" #include "mozilla/dom/WorkerLoadInfo.h" #include "mozilla/dom/workerinternals/JSSettings.h" #include "mozilla/dom/workerinternals/Queue.h" #ifdef XP_WIN @@ -26,16 +24,25 @@ #endif class nsIConsoleReportCollector; class nsIThreadInternal; namespace mozilla { namespace dom { +// If you change this, the corresponding list in nsIWorkerDebugger.idl needs +// to be updated too. +enum WorkerType +{ + WorkerTypeDedicated, + WorkerTypeShared, + WorkerTypeService +}; + class ClientInfo; class ClientSource; class Function; class MessagePort; class MessagePortIdentifier; class PerformanceStorage; class SharedWorker; class WorkerControlRunnable;