Commit Graph

1487 Commits

Author SHA1 Message Date
Ehsan Akhgari
f479f50502 Bug 1147699 - Part 4: Add a test for FetchEvent.request.context when intercepting a responsive image load; r=nsm 2015-03-30 08:42:35 -04:00
Ehsan Akhgari
6fdcabe29e Bug 1147699 - Part 3: Add a test for FetchEvent.request.context when intercepting an image load; r=nsm,bzbarsky 2015-03-30 08:42:34 -04:00
Ehsan Akhgari
99c8062500 Bug 1147699 - Part 2: Set the content policy type on FetchEvent.request based on the content policy type of the channel; r=nsm
Note that InternalRequest::SetContentPolicyType takes care of updating the
RequestContext value stored in InternalRequest too.
2015-03-30 08:42:33 -04:00
Ehsan Akhgari
47c59f235a Bug 1147699 - Part 1: Move Request::mContext to InternalRequest, and determine the mapping to nsContentPolicyType; r=nsm
As the documentation in InternalRequest.h in this patch shows, the
mapping between nsContentPolicyType and RequestContext is not complete
yet.  Because the InternalRequest object needs to know the actual
nsContentPolicyType in order for FetchDriver to be able to use that
information, we can't just store the RequestContext.  Therefore, this
patch adds both of these to InternalRequest.  Once we get to a stage
where we have a complete mapping of these values, we can store only one
of them and compute the other from it.  That requires addressing all of
the TODO comments in the InternalRequest.h documentation.
2015-03-30 08:42:31 -04:00
Eddy Bruël
8f6d3f73d2 Bug 1092102 - Implement WorkerDebuggerGlobalScope.setImmediate;r=khuey 2015-03-30 13:54:38 +02:00
Nick Fitzgerald
43962cb694 Bug 1038238 - Part 1: Make Error instances use SavedFrame objects for their
stacks; r=jorendorff
2015-03-27 13:08:46 -07:00
Andrea Marchesini
e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Timur Valeev
19a398b233 Bug 1146365 - Add support of union type for FetchEvent.respondWith. r=nsm, r=ehsan 2015-03-24 10:37:39 +03:00
Andrew Overholt
51804b48fa Bug 1127552 - Add Telemetry to Fetch. r=nsm
Note when the Fetch is coming from the main thread or a worker.  Also
count Requests just passed through a Service Worker.

--HG--
extra : rebase_source : 5ab71144821a97f0ec1874d467da68f4fd171705
2015-03-27 06:47:00 -04:00
Eddy Bruël
208b56c029 Bug 1092102 - Implement WorkerDebuggerGlobalScope.enterEventLoop;r=khuey 2015-03-27 07:17:16 +01:00
Jose Antonio Olivera Ortega
60663a3ab3 Bug 1139513 - Warn and gather data if ServiceWorker hits max workers per domain limit. r=bent, r=rvitillo 2015-03-25 13:17:00 -04:00
Jose Antonio Olivera Ortega
6e115add99 Bug 1003991 - Disable https:// only load for ServiceWorkers when Developer Tools are open. r=nsm, r=miker 2015-03-24 14:15:00 -04:00
Eddy Bruël
7c855a15e6 Bug 1092102 - Implement WorkerDebuggerGlobalScope.reportError;r=khuey 2015-03-26 20:09:45 +01:00
Ehsan Akhgari
6115fab25e Bug 1147367 - Add a test for checking the Request.context attribute for FetchEvents generated for fetch(); r=nsm 2015-03-25 21:28:22 -04:00
Andrea Marchesini
9e3334a9eb Bug 803537 - XHR crashes in workers and in debug-builds when blob URLs are used from file scheme documents, r=khuey 2015-03-25 18:09:24 +00:00
Ehsan Akhgari
5bec74a407 Remove the unneeded variable, no bug, DONTBUILD 2015-03-24 17:35:16 -04:00
Ehsan Akhgari
b5a110ac65 Bug 1142727 - Do not intercept sandboxed iframes with service workers; r=nsm
This is temporary until we clarify what we want to do with these
iframes in the spec.
2015-03-24 16:45:14 -04:00
Nikhil Marathe
8f230527ff Bug 1136200 - Verify request type is not no-cors if response is opaque. r=jdm
--HG--
extra : transplant_source : %C2%95%89%0Az%29%9D%F8F%85%E1%83%C1%0D%25%9F%1Ck%3B%28
2015-03-17 08:47:03 -07:00
Nikhil Marathe
7a7e74fe7c Bug 1134324 - Set CORS mode and credentials on Fetch event Request. r=michal
renames fetch to fetchXHR() since fetch() is now a superpower.

--HG--
extra : transplant_source : %DA%00%E38%A6%0Fw%DA%26%D3%A9q%AE%A6%FE%BA%81%AA%EEB
2015-03-17 08:47:02 -07:00
Ehsan Akhgari
cfa0a6430f Remove the remnants of the dom.fetch.enabled pref, no bug 2015-03-23 15:46:59 -04:00
Josh Matthews
41763998ae Bug 1134330 - Mark fetch events as reloads appropriately. r=smaug 2015-03-23 13:36:44 -04:00
Nikhil Marathe
fa2b7dfb6b Bug 1141332 - Disable content decoding and use decoded length on intercepted channels. r=mcmanus
--HG--
extra : transplant_source : %B9%A2%AB.%EA%A4%ABH%86%D0%F0%3F%DE%03%DF%7D%A9p%B2%D5
2015-03-17 08:48:32 -07:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Timur Valeev
19d6b48603 Bug 1136757 - Add direct Response overload for FetchEvent.respondWith(). r=jdm,nsm,ehsan
ON CLOSED TREE
Fix bug number

--HG--
extra : rebase_source : 98ca84186a9840a8827aa8da8a217badffc856c2
extra : histedit_source : ae3613ff672e71d340587c74d511e2beb04030f8
2015-03-20 08:44:20 -07:00
Nikhil Marathe
a6bcf43dcd Backed out changeset 62b55b1f9b7e for wrong bug number ON CLOSED TREE
--HG--
extra : rebase_source : ce58377252069674fd30d3c9ebca91c8d4aca780
extra : histedit_source : 4af47c8f4abf6ba8c234547e47c99a737d3e4771
2015-03-20 08:43:59 -07:00
Timur Valeev
4a14abec30 Bug 1135627 - Add direct Response overload for FetchEvent.respondWith(). r=jdm,nsm,ehsan
--HG--
extra : rebase_source : 1df0b695586ff6273e7e5ded032c2daa3d5e1e31
2015-03-18 06:17:11 +03:00
Eddy Bruël
7989a0b7bf Bug 1092102 - Implement WorkerDebugger.postMessage;r=khuey 2015-03-20 12:15:59 +01:00
Boris Zbarsky
dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Boris Zbarsky
d0ebde3bb7 Bug 1117172 part 2. Change the non-wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, Codegen.py, and
StructuredClone.cpp.  The rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/WrapObject\((JSContext *\* *(?:aCx|cx)),(\s*)(JS::MutableHandle<JSObject\*> aReflector)/WrapObject(\1,\2JS::Handle<JSObject*> aGivenProto,\2\3/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx)), this, aReflector/\1, this, aGivenProto, aReflector/'
2015-03-19 10:13:32 -04:00
Ehsan Akhgari
c10f1ac2e6 Bug 1144876 - Stop spamming stderr with a warning every time that we encounter a document that is not controlled by a service worker; r=nsm 2015-03-18 14:16:00 +01:00
Andrew McCreight
fa1e69dd93 Bug 1137536, part 2 - Make sure every file that uses an nsCycleCollector_ function includes nsCycleCollector.h. r=smaug
This will let us remove it from headers after we split out DeferredFinalize into its own header.
2015-03-18 11:36:03 -07:00
Catalin Badea
7774d591e4 Bug 982726 follow-up: Add exempt from worker limit pref to a test. 2015-03-18 16:56:47 +02:00
Catalin Badea
d15c1bbafb Bug 982726 - Test the number of clients returned by matchAll. r=nsm 2015-03-18 16:47:17 +02:00
Nikhil Marathe
c7893519a9 Bug 1134462 - Cleanup Promise usage in fetch test SW. r=jdm
--HG--
extra : rebase_source : c74bc35e4c675e8ece5b43790e93f727888c5b5d
2015-03-17 08:48:31 -07:00
Nikhil Marathe
b470a6df88 Bug 1134462 - allow null body. r=jdm
--HG--
extra : rebase_source : 35d79b8d3701e993f284dcafe0e78fe08ef316db
2015-03-17 08:48:30 -07:00
Nikhil Marathe
191be106d4 Bug 1134462 - Synthesize status and headers from Response returned by ServiceWorker. r=jdm
--HG--
extra : rebase_source : 6bfb181427869bb99a0812608e75b6311f3dfb97
2015-03-17 08:48:30 -07:00
Daniel Holbert
082fd9cd7f Bug 1142841: Convert all nsRefPtr<nsIRunnable> to nsCOMPtr<nsIRunnable>. r=ehsan
This patch was generated by a script.  Here's the source of the script for
future reference:

find . \( -iname "*.cpp" -o -iname "*.h" \) | \
  xargs -n 1 sed -i "s/nsRefPtr<nsIRunnable>/nsCOMPtr<nsIRunnable>/g"
2015-03-17 09:29:17 -07:00
Eddy Bruël
2d0841a4c7 Bug 1092102 - Implement WorkerDebugger.initialize;r=khuey 2015-03-17 11:15:19 +01:00
Nikhil Marathe
508af070e6 Bug 739173 - Support FormData in workers. r=khuey,baku
--HG--
extra : rebase_source : 2ddd847d280e3aede963c51ed525170d86eebd3c
2015-01-27 15:16:21 -08:00
Nikhil Marathe
8808a1f942 Bug 1131271 - Set ServiceWorker script redirect limit to zero. r=bkelly,ehsan
--HG--
extra : rebase_source : 2cfc2a1d383a8352b63a4b34ca97b88decefb7c9
2015-02-09 13:47:09 -08:00
Nikhil Marathe
5ffa8c89b7 Bug 1130688 - Implement additional scope checking in service worker registration. r=bkelly,ehsan
--HG--
extra : amend_source : 19663c098313445da8c3c271cea59dc366207d43
extra : transplant_source : %CFl%F7%92%0B%22%5D%CB%10%DE%B6%3F%19%1AW%DA%D9%0FS%85
2015-03-09 18:57:06 -07:00
Nikhil Marathe
6d65226133 Bug 1140791 - Run fetch tests on main thread and workers. r=ehsan
--HG--
rename : dom/tests/mochitest/fetch/worker_test_fetch_basic.js => dom/tests/mochitest/fetch/test_fetch_basic.js
rename : dom/tests/mochitest/fetch/worker_test_fetch_basic_http.js => dom/tests/mochitest/fetch/test_fetch_basic_http.js
rename : dom/tests/mochitest/fetch/worker_test_fetch_cors.js => dom/tests/mochitest/fetch/test_fetch_cors.js
rename : dom/workers/test/fetch/test_request.html => dom/tests/mochitest/fetch/test_request.html
rename : dom/workers/test/fetch/worker_test_request.js => dom/tests/mochitest/fetch/test_request.js
rename : dom/workers/test/fetch/test_response.html => dom/tests/mochitest/fetch/test_response.html
rename : dom/workers/test/fetch/worker_test_response.js => dom/tests/mochitest/fetch/test_response.js
extra : rebase_source : d889a24b81681948f67604bacd95f05fac96ef57
2015-03-11 14:48:58 -07:00
Catalin Badea
96bdb9cb6a Bug 1142015 - Add source for messages dispatched to a Service Worker. r=baku 2015-03-16 22:23:42 +02:00
Catalin Badea
cbc3e96c50 Bug 1143732 - Add exempt from limit for two service worker tests. r=bkelly 2015-03-16 19:57:42 +02:00
Albert Crespell
6fc5c56408 Bug 1139425 - Service Worker Client uuid tests. r=baku 2015-03-16 11:20:40 +01:00
Albert Crespell
7f663f49db Bug 1139425 - Service Worker Client id should return a DOMString uuid. r=baku 2015-03-13 07:15:25 +01:00
Boris Zbarsky
fe0f33e72f Bug 1097987 part 7. Require callers of JS::Evaluate to either use the global as the scope or pass in an explicit scopechain. r=waldo 2015-03-14 01:36:16 -04:00
Ehsan Akhgari
9693cea624 Bug 1133763 - Part 8: Ensure that FetchEvent.respondWith works correctly on HTTPS requests with a cloned response; r=nsm 2015-03-13 14:37:27 -04:00
Ehsan Akhgari
9cdf67372b Bug 1133763 - Part 7: Add automated tests for using FetchEvent.respondWith on an HTTPS request; r=nsm 2015-03-13 14:37:25 -04:00
Ehsan Akhgari
1332a683d5 Bug 1133763 - Part 6: Set the correct security info on intercepted channels when using the respondWith API; r=jdm 2015-03-13 14:37:24 -04:00