Bug 1378342 - AbortSignal/AbortController - part 1 - Moving FetchController/FetchSignal into dom/abort, r=bkelly
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 29 Aug 2017 11:31:05 +0200
changeset 377369 ec2a82e0ceeb519a6090693b8d8a3106640b6b59
parent 377368 d133ea537108e8b7f9c23d951cfd288c964cf6c6
child 377370 08be9ade792d3d73fb07c822563b9a339bb008b6
push id94265
push useramarchesini@mozilla.com
push dateTue, 29 Aug 2017 09:31:26 +0000
treeherdermozilla-inbound@92692c9a4f1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1378342
milestone57.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 1378342 - AbortSignal/AbortController - part 1 - Moving FetchController/FetchSignal into dom/abort, r=bkelly
dom/abort/FetchController.cpp
dom/abort/FetchController.h
dom/abort/FetchSignal.cpp
dom/abort/FetchSignal.h
dom/abort/moz.build
dom/abort/tests/file_fetch_controller.html
dom/abort/tests/mochitest.ini
dom/abort/tests/moz.build
dom/abort/tests/test_fetch_controller.html
dom/abort/tests/worker_fetch_controller.js
dom/fetch/FetchController.cpp
dom/fetch/FetchController.h
dom/fetch/FetchSignal.cpp
dom/fetch/FetchSignal.h
dom/fetch/moz.build
dom/moz.build
dom/tests/mochitest/fetch/file_fetch_controller.html
dom/tests/mochitest/fetch/mochitest.ini
dom/tests/mochitest/fetch/test_fetch_controller.html
dom/tests/mochitest/fetch/worker_fetch_controller.js
rename from dom/fetch/FetchController.cpp
rename to dom/abort/FetchController.cpp
--- a/dom/fetch/FetchController.cpp
+++ b/dom/abort/FetchController.cpp
@@ -2,16 +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/. */
 
 #include "FetchController.h"
 #include "FetchSignal.h"
 #include "mozilla/dom/FetchControllerBinding.h"
+#include "WorkerPrivate.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FetchController, mGlobal, mSignal,
                                       mFollowingSignal)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(FetchController)
rename from dom/fetch/FetchController.h
rename to dom/abort/FetchController.h
rename from dom/fetch/FetchSignal.cpp
rename to dom/abort/FetchSignal.cpp
rename from dom/fetch/FetchSignal.h
rename to dom/abort/FetchSignal.h
new file mode 100644
--- /dev/null
+++ b/dom/abort/moz.build
@@ -0,0 +1,26 @@
+# -*- 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/.
+
+with Files("**"):
+    BUG_COMPONENT = ("Core", "DOM")
+
+TEST_DIRS += ['tests']
+
+EXPORTS.mozilla.dom += [
+    'FetchController.h',
+    'FetchSignal.h',
+]
+
+UNIFIED_SOURCES += [
+    'FetchController.cpp',
+    'FetchSignal.cpp',
+]
+
+LOCAL_INCLUDES += [
+    '../workers',
+]
+
+FINAL_LIBRARY = 'xul'
rename from dom/tests/mochitest/fetch/file_fetch_controller.html
rename to dom/abort/tests/file_fetch_controller.html
new file mode 100644
--- /dev/null
+++ b/dom/abort/tests/mochitest.ini
@@ -0,0 +1,6 @@
+[DEFAULT]
+support-files =
+  file_fetch_controller.html
+  worker_fetch_controller.js
+
+[test_fetch_controller.html]
new file mode 100644
--- /dev/null
+++ b/dom/abort/tests/moz.build
@@ -0,0 +1,7 @@
+# -*- 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/.
+
+MOCHITEST_MANIFESTS += ['mochitest.ini']
rename from dom/tests/mochitest/fetch/test_fetch_controller.html
rename to dom/abort/tests/test_fetch_controller.html
rename from dom/tests/mochitest/fetch/worker_fetch_controller.js
rename to dom/abort/tests/worker_fetch_controller.js
--- a/dom/fetch/moz.build
+++ b/dom/fetch/moz.build
@@ -6,40 +6,36 @@
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM")
 
 EXPORTS.mozilla.dom += [
     'BodyExtractor.h',
     'ChannelInfo.h',
     'Fetch.h',
-    'FetchController.h',
     'FetchDriver.h',
     'FetchIPCTypes.h',
     'FetchObserver.h',
-    'FetchSignal.h',
     'FetchStreamReader.h',
     'FetchUtil.h',
     'Headers.h',
     'InternalHeaders.h',
     'InternalRequest.h',
     'InternalResponse.h',
     'Request.h',
     'Response.h',
 ]
 
 UNIFIED_SOURCES += [
     'BodyExtractor.cpp',
     'ChannelInfo.cpp',
     'Fetch.cpp',
     'FetchConsumer.cpp',
-    'FetchController.cpp',
     'FetchDriver.cpp',
     'FetchObserver.cpp',
-    'FetchSignal.cpp',
     'FetchStream.cpp',
     'FetchStreamReader.cpp',
     'FetchUtil.cpp',
     'Headers.cpp',
     'InternalHeaders.cpp',
     'InternalRequest.cpp',
     'InternalResponse.cpp',
     'Request.cpp',
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -37,16 +37,17 @@ interfaces = [
     'smil',
     'push',
     'payments',
 ]
 
 DIRS += ['interfaces/' + i for i in interfaces]
 
 DIRS += [
+    'abort',
     'animation',
     'base',
     'bindings',
     'battery',
     'browser-element',
     'cache',
     'canvas',
     'commandhandler',
--- a/dom/tests/mochitest/fetch/mochitest.ini
+++ b/dom/tests/mochitest/fetch/mochitest.ini
@@ -1,12 +1,11 @@
 [DEFAULT]
 support-files =
   fetch_test_framework.js
-  file_fetch_controller.html
   file_fetch_cached_redirect.html
   file_fetch_cached_redirect.html^headers^
   file_fetch_csp_block_frame.html
   file_fetch_csp_block_frame.html^headers^
   test_fetch_basic.js
   test_fetch_basic_http.js
   test_fetch_cached_redirect.js
   test_fetch_cors.js
@@ -23,17 +22,16 @@ support-files =
   reroute.js
   reroute.js^headers^
   slow.sjs
   sw_reroute.js
   empty.js
   empty.js^headers^
   worker_temporaryFileBlob.js
   common_temporaryFileBlob.js
-  worker_fetch_controller.js
   common_readableStreams.js
   worker_readableStreams.js
   iframe_readableStreams.html
   !/dom/xhr/tests/file_XHR_binary1.bin
   !/dom/xhr/tests/file_XHR_binary1.bin^headers^
   !/dom/xhr/tests/file_XHR_binary2.bin
   !/dom/xhr/tests/file_XHR_pass1.xml
   !/dom/xhr/tests/file_XHR_pass2.txt
@@ -52,17 +50,16 @@ support-files =
 [test_headers_mainthread.html]
 [test_fetch_basic.html]
 [test_fetch_basic_sw_reroute.html]
 [test_fetch_basic_sw_empty_reroute.html]
 [test_fetch_basic_http.html]
 [test_fetch_basic_http_sw_reroute.html]
 [test_fetch_basic_http_sw_empty_reroute.html]
 [test_fetch_cached_redirect.html]
-[test_fetch_controller.html]
 [test_fetch_cors.html]
 skip-if = toolkit == 'android' && debug # Bug 1210282
 [test_fetch_cors_sw_reroute.html]
 skip-if = toolkit == 'android' && debug # Bug 1210282
 [test_fetch_cors_sw_empty_reroute.html]
 skip-if = toolkit == 'android' && debug # Bug 1210282
 [test_fetch_csp_block.html]
 [test_fetch_observer.html]