Bug 1438945 - Part 1: Moving SharedWorker in a separate folder. r=asuth
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 19 Nov 2018 15:18:20 -0800
changeset 503563 f816f239955c03172fc46f1caf8a46a898eca4e8
parent 503562 0892fe15bc04299d99b9ae77088dafa31157584a
child 503564 d77e06240f3c05f592381bbbbed176eb78c4c7de
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1438945
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1438945 - Part 1: Moving SharedWorker in a separate folder. r=asuth
dom/workers/RuntimeService.cpp
dom/workers/SharedWorker.cpp
dom/workers/SharedWorker.h
dom/workers/Worker.cpp
dom/workers/WorkerPrivate.cpp
dom/workers/moz.build
dom/workers/sharedworkers/SharedWorker.cpp
dom/workers/sharedworkers/SharedWorker.h
dom/workers/sharedworkers/moz.build
--- a/dom/workers/RuntimeService.cpp
+++ b/dom/workers/RuntimeService.cpp
@@ -45,16 +45,17 @@
 #include "mozilla/dom/ErrorEventBinding.h"
 #include "mozilla/dom/EventTargetBinding.h"
 #include "mozilla/dom/FetchUtil.h"
 #include "mozilla/dom/MessageChannel.h"
 #include "mozilla/dom/MessageEventBinding.h"
 #include "mozilla/dom/PerformanceService.h"
 #include "mozilla/dom/WorkerBinding.h"
 #include "mozilla/dom/ScriptSettings.h"
+#include "mozilla/dom/SharedWorker.h"
 #include "mozilla/dom/IndexedDatabaseManager.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/Navigator.h"
 #include "mozilla/Monitor.h"
 #include "mozilla/StaticPrefs.h"
 #include "nsContentUtils.h"
@@ -66,17 +67,16 @@
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "nsXPCOM.h"
 #include "nsXPCOMPrivate.h"
 #include "OSFileConstants.h"
 #include "xpcpublic.h"
 
 #include "Principal.h"
-#include "SharedWorker.h"
 #include "WorkerDebuggerManager.h"
 #include "WorkerError.h"
 #include "WorkerLoadInfo.h"
 #include "WorkerPrivate.h"
 #include "WorkerRunnable.h"
 #include "WorkerScope.h"
 #include "WorkerThread.h"
 #include "prsystem.h"
--- a/dom/workers/Worker.cpp
+++ b/dom/workers/Worker.cpp
@@ -8,16 +8,20 @@
 
 #include "MessageEventRunnable.h"
 #include "mozilla/dom/WorkerBinding.h"
 #include "mozilla/TimelineConsumers.h"
 #include "mozilla/WorkerTimelineMarker.h"
 #include "nsContentUtils.h"
 #include "WorkerPrivate.h"
 
+#ifdef XP_WIN
+#undef PostMessage
+#endif
+
 namespace mozilla {
 namespace dom {
 
 /* static */ already_AddRefed<Worker>
 Worker::Constructor(const GlobalObject& aGlobal, const nsAString& aScriptURL,
                     const WorkerOptions& aOptions, ErrorResult& aRv)
 {
   JSContext* cx = aGlobal.Context();
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -52,17 +52,17 @@
 #include "nsRFPService.h"
 #include "nsSandboxFlags.h"
 #include "nsUTF8Utils.h"
 
 #include "RuntimeService.h"
 #include "ScriptLoader.h"
 #include "mozilla/dom/ServiceWorkerEvents.h"
 #include "mozilla/dom/ServiceWorkerManager.h"
-#include "SharedWorker.h"
+#include "mozilla/dom/SharedWorker.h"
 #include "WorkerCSPEventListener.h"
 #include "WorkerDebugger.h"
 #include "WorkerDebuggerManager.h"
 #include "WorkerError.h"
 #include "WorkerEventTarget.h"
 #include "WorkerNavigator.h"
 #include "WorkerRef.h"
 #include "WorkerRunnable.h"
--- a/dom/workers/moz.build
+++ b/dom/workers/moz.build
@@ -2,20 +2,21 @@
 # vim: set filetype=python:
 # 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/.
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM: Workers")
 
+DIRS += ['sharedworkers']
+
 # Public stuff.
 EXPORTS.mozilla.dom += [
     'ChromeWorker.h',
-    'SharedWorker.h',
     'Worker.h',
     'WorkerCommon.h',
     'WorkerDebugger.h',
     'WorkerDebuggerManager.h',
     'WorkerHolder.h',
     'WorkerHolderToken.h',
     'WorkerLoadInfo.h',
     'WorkerLocation.h',
@@ -43,17 +44,16 @@ XPIDL_SOURCES += [
 UNIFIED_SOURCES += [
     'ChromeWorker.cpp',
     'ChromeWorkerScope.cpp',
     'MessageEventRunnable.cpp',
     'Principal.cpp',
     'RegisterBindings.cpp',
     'RuntimeService.cpp',
     'ScriptLoader.cpp',
-    'SharedWorker.cpp',
     'Worker.cpp',
     'WorkerCSPEventListener.cpp',
     'WorkerDebugger.cpp',
     'WorkerDebuggerManager.cpp',
     'WorkerError.cpp',
     'WorkerEventTarget.cpp',
     'WorkerHolder.cpp',
     'WorkerHolderToken.cpp',
rename from dom/workers/SharedWorker.cpp
rename to dom/workers/sharedworkers/SharedWorker.cpp
--- a/dom/workers/SharedWorker.cpp
+++ b/dom/workers/sharedworkers/SharedWorker.cpp
@@ -14,18 +14,18 @@
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/MessagePort.h"
 #include "mozilla/dom/SharedWorkerBinding.h"
 #include "mozilla/dom/WorkerBinding.h"
 #include "mozilla/Telemetry.h"
 #include "nsContentUtils.h"
 #include "nsIClassInfoImpl.h"
 
-#include "RuntimeService.h"
-#include "WorkerPrivate.h"
+#include "mozilla/dom/workerinternals/RuntimeService.h"
+#include "mozilla/dom/WorkerPrivate.h"
 
 #ifdef XP_WIN
 #undef PostMessage
 #endif
 
 using mozilla::dom::Optional;
 using mozilla::dom::Sequence;
 using mozilla::dom::MessagePort;
rename from dom/workers/SharedWorker.h
rename to dom/workers/sharedworkers/SharedWorker.h
--- a/dom/workers/SharedWorker.h
+++ b/dom/workers/sharedworkers/SharedWorker.h
@@ -2,18 +2,17 @@
 /* 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_workers_sharedworker_h__
 #define mozilla_dom_workers_sharedworker_h__
 
-#include "WorkerCommon.h"
-
+#include "mozilla/dom/WorkerCommon.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/DOMEventTargetHelper.h"
 
 #ifdef XP_WIN
 #undef PostMessage
 #endif
 
 class nsPIDOMWindowInner;
new file mode 100644
--- /dev/null
+++ b/dom/workers/sharedworkers/moz.build
@@ -0,0 +1,17 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+EXPORTS.mozilla.dom += [
+    'SharedWorker.h',
+]
+
+UNIFIED_SOURCES += [
+    'SharedWorker.cpp',
+]
+
+include('/ipc/chromium/chromium-config.mozbuild')
+
+FINAL_LIBRARY = 'xul'