Bug 1413112 - Fixing includes in dom/workers, r=bkelly

This commit is contained in:
Andrea Marchesini 2018-01-30 10:14:00 +01:00
Родитель c0b9cdcdd1
Коммит 9774cec092
13 изменённых файлов: 56 добавлений и 127 удалений

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

@ -15,6 +15,7 @@
#include "mozilla/dom/workers/bindings/WorkerHolderToken.h"
#include "mozilla/ipc/BackgroundChild.h"
#include "mozilla/ipc/PBackgroundChild.h"
#include "nsContentUtils.h"
#include "prthread.h"
namespace mozilla {

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

@ -33,6 +33,7 @@
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::dom::workers;
using mozilla::dom::Optional;
using mozilla::dom::GlobalObject;

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

@ -10,6 +10,7 @@
#include "MainThreadUtils.h"
#include "mozilla/dom/ServiceWorkerBinding.h" // For ServiceWorkerState
#include "mozilla/dom/workers/WorkerCommon.h"
#include "mozilla/OriginAttributes.h"
#include "nsIServiceWorkerManager.h"
namespace mozilla {

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

@ -11,7 +11,12 @@
#include "WorkerRunnable.h"
#include "mozilla/dom/StructuredCloneHolder.h"
BEGIN_WORKERS_NAMESPACE
namespace mozilla {
class DOMEventTargetHelper;
namespace dom {
namespace workers {
class MessageEventRunnable final : public WorkerRunnable
, public StructuredCloneHolder
@ -32,6 +37,8 @@ private:
DispatchError(JSContext* aCx, DOMEventTargetHelper* aTarget);
};
END_WORKERS_NAMESPACE
} // workers namespace
} // dom namespace
} // mozilla namespace
#endif // mozilla_dom_workers_MessageEventRunnable_h

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

@ -76,6 +76,8 @@
#include "WorkerThread.h"
#include "prsystem.h"
#define WORKERS_SHUTDOWN_TOPIC "web-workers-shutdown"
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::ipc;

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

@ -21,6 +21,10 @@
#include "RuntimeService.h"
#include "WorkerPrivate.h"
#ifdef XP_WIN
#undef PostMessage
#endif
using mozilla::dom::Optional;
using mozilla::dom::Sequence;
using mozilla::dom::MessagePort;

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

@ -12,6 +12,10 @@
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/DOMEventTargetHelper.h"
#ifdef XP_WIN
#undef PostMessage
#endif
class nsIDOMEvent;
class nsPIDOMWindowInner;

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

@ -11,18 +11,12 @@
#include "mozilla/Attributes.h"
#include "mozilla/Maybe.h"
#include "mozilla/Mutex.h"
#include <stdint.h>
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsDebug.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsILoadContext.h"
#include "nsIWeakReferenceUtils.h"
#include "mozilla/dom/ChannelInfo.h"
#include "mozilla/dom/ServiceWorkerDescriptor.h"
#include "mozilla/net/ReferrerPolicy.h"
#define BEGIN_WORKERS_NAMESPACE \
namespace mozilla { namespace dom { namespace workers {
@ -31,8 +25,6 @@
#define USING_WORKERS_NAMESPACE \
using namespace mozilla::dom::workers;
#define WORKERS_SHUTDOWN_TOPIC "web-workers-shutdown"
class nsIGlobalObject;
class nsPIDOMWindowInner;

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

@ -7,9 +7,14 @@
#ifndef mozilla_dom_workers_WorkerLoadInfo_h
#define mozilla_dom_workers_WorkerLoadInfo_h
#include "mozilla/dom/ChannelInfo.h"
#include "mozilla/dom/workers/WorkerCommon.h"
#include "mozilla/net/ReferrerPolicy.h"
#include "nsIInterfaceRequestor.h"
#include "nsILoadContext.h"
#include "nsIRequest.h"
#include "nsISupportsImpl.h"
#include "nsIWeakReferenceUtils.h"
class nsIChannel;
class nsIContentSecurityPolicy;

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

@ -7,52 +7,16 @@
#include "WorkerPrivate.h"
#include "amIAddonManager.h"
#include "nsIClassInfo.h"
#include "nsIContentSecurityPolicy.h"
#include "nsIConsoleService.h"
#include "nsIDOMDOMException.h"
#include "nsIDOMEvent.h"
#include "nsIDocument.h"
#include "nsIDocShell.h"
#include "nsIInterfaceRequestor.h"
#include "nsIMemoryReporter.h"
#include "nsINamed.h"
#include "nsIPermissionManager.h"
#include "nsIScriptError.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptSecurityManager.h"
#include "nsIScriptTimeoutHandler.h"
#include "nsITextToSubURI.h"
#include "nsIThreadInternal.h"
#include "nsITimer.h"
#include "nsIURI.h"
#include "nsIURL.h"
#include "nsIWeakReferenceUtils.h"
#include "nsIXPConnect.h"
#include "nsPIDOMWindow.h"
#include "nsGlobalWindow.h"
#include <algorithm>
#include "ImageContainer.h"
#include "jsfriendapi.h"
#include "js/MemoryMetrics.h"
#include "MessageEventRunnable.h"
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/ContentEvents.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/Likely.h"
#include "mozilla/Move.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/ClientManager.h"
#include "mozilla/dom/ClientSource.h"
#include "mozilla/dom/ClientState.h"
#include "mozilla/dom/Console.h"
#include "mozilla/dom/DocGroup.h"
#include "mozilla/dom/DOMTypes.h"
#include "mozilla/dom/ErrorEvent.h"
#include "mozilla/dom/ErrorEventBinding.h"
#include "mozilla/dom/Exceptions.h"
#include "mozilla/dom/ExtendableMessageEventBinding.h"
#include "mozilla/dom/Event.h"
#include "mozilla/dom/FunctionBinding.h"
#include "mozilla/dom/IndexedDatabaseManager.h"
#include "mozilla/dom/MessageEvent.h"
@ -62,45 +26,24 @@
#include "mozilla/dom/nsCSPUtils.h"
#include "mozilla/dom/Performance.h"
#include "mozilla/dom/PerformanceStorageWorker.h"
#include "mozilla/dom/PMessagePort.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/PromiseDebugging.h"
#include "mozilla/dom/PromiseNativeHandler.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/StructuredCloneHolder.h"
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/Preferences.h"
#include "mozilla/ThreadEventQueue.h"
#include "mozilla/ThrottledEventQueue.h"
#include "mozilla/TimelineConsumers.h"
#include "mozilla/WorkerTimelineMarker.h"
#include "nsAlgorithm.h"
#include "nsContentUtils.h"
#include "nsCycleCollector.h"
#include "nsError.h"
#include "nsDOMJSUtils.h"
#include "nsHostObjectProtocolHandler.h"
#include "nsJSEnvironment.h"
#include "nsJSUtils.h"
#include "nsNetUtil.h"
#include "nsIMemoryReporter.h"
#include "nsIPermissionManager.h"
#include "nsIScriptError.h"
#include "nsIScriptTimeoutHandler.h"
#include "nsIURI.h"
#include "nsIURL.h"
#include "nsPrintfCString.h"
#include "nsProxyRelease.h"
#include "nsQueryObject.h"
#include "nsSandboxFlags.h"
#include "nsUTF8Utils.h"
#include "prthread.h"
#include "xpcpublic.h"
#ifdef ANDROID
#include <android/log.h>
#endif
#ifdef DEBUG
#include "nsThreadManager.h"
#endif
#include "Navigator.h"
#include "Principal.h"
#include "RuntimeService.h"
#include "ScriptLoader.h"
#include "mozilla/dom/ServiceWorkerEvents.h"
@ -109,12 +52,19 @@
#include "WorkerDebugger.h"
#include "WorkerDebuggerManager.h"
#include "WorkerError.h"
#include "WorkerHolder.h"
#include "WorkerNavigator.h"
#include "WorkerRunnable.h"
#include "WorkerScope.h"
#include "WorkerThread.h"
#ifdef DEBUG
#include "nsThreadManager.h"
#endif
#ifdef XP_WIN
#undef PostMessage
#endif
// JS_MaybeGC will run once every second during normal execution.
#define PERIODIC_GC_TIMER_DELAY_SEC 1

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

@ -8,90 +8,48 @@
#define mozilla_dom_workers_workerprivate_h__
#include "WorkerCommon.h"
#include "WorkerLoadInfo.h"
#include "js/CharacterEncoding.h"
#include "nsIContentPolicy.h"
#include "nsIContentSecurityPolicy.h"
#include "nsILoadGroup.h"
#include "nsPIDOMWindow.h"
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include "mozilla/CondVar.h"
#include "mozilla/ConsoleReportCollector.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/Move.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "nsAutoPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDataHashtable.h"
#include "nsHashKeys.h"
#include "nsRefPtrHashtable.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsDOMNavigationTiming.h"
#include "nsIContentSecurityPolicy.h"
#include "nsIEventTarget.h"
#include "nsThreadUtils.h"
#include "nsTObserverArray.h"
#include "Queue.h"
#include "WorkerHolder.h"
#include "WorkerLoadInfo.h"
#ifdef XP_WIN
#undef PostMessage
#endif
class nsIChannel;
class nsIConsoleReportCollector;
class nsIDocument;
class nsIEventTarget;
class nsIPrincipal;
class nsIScriptContext;
class nsIScriptTimeoutHandler;
class nsISerialEventTarget;
class nsISerializable;
class nsIThread;
class nsIThreadInternal;
class nsITimer;
class nsIURI;
template<class T> class nsMainThreadPtrHandle;
namespace JS {
struct RuntimeStats;
} // namespace JS
namespace mozilla {
class ThrottledEventQueue;
namespace dom {
class ClientInfo;
class ClientSource;
class Function;
class MessagePort;
class MessagePortIdentifier;
class PerformanceStorage;
class PromiseNativeHandler;
class StructuredCloneHolder;
class WorkerDebuggerGlobalScope;
class WorkerErrorReport;
class WorkerGlobalScope;
struct WorkerOptions;
} // namespace dom
namespace ipc {
class PrincipalInfo;
} // namespace ipc
} // namespace mozilla
struct PRThread;
} // dom namespace
} // mozilla namespace
BEGIN_WORKERS_NAMESPACE
class AutoSyncLoopHolder;
class SharedWorker;
class ServiceWorkerClientInfo;
class WorkerEventTarget;
class WorkerControlRunnable;
class WorkerDebugger;
class WorkerPrivate;
class WorkerEventTarget;
class WorkerRunnable;
class WorkerThread;

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

@ -570,7 +570,7 @@ WorkerMainThreadRunnable::WorkerMainThreadRunnable(
}
void
WorkerMainThreadRunnable::Dispatch(Status aFailStatus, ErrorResult& aRv)
WorkerMainThreadRunnable::Dispatch(Status aFailStatus, mozilla::ErrorResult& aRv)
{
mWorkerPrivate->AssertIsOnWorkerThread();

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

@ -14,6 +14,10 @@
#include "nsWeakReference.h"
#include "mozilla/dom/ImageBitmapSource.h"
#ifdef XP_WIN
#undef PostMessage
#endif
namespace mozilla {
namespace dom {