Commit Graph

2429 Commits

Author SHA1 Message Date
Catalin Badea
e13c1c9c9e Bug 1172870 - Part 3 - Fix openWindow mochitest to work on e10s. r=smaug 2015-10-30 01:30:58 +02:00
Catalin Badea
8255b13467 Bug 1172870 - Part 2 - Enable ServiceWorkerClients::OpenWindow on e10s desktop. r=smaug 2015-10-30 01:30:57 +02:00
Ehsan Akhgari
da8340a541 Bug 1218621 - Keep the service worker alive while the promise passed to FetchEvent.respondWith() settles; r=catalinb 2015-10-27 17:10:57 -04:00
Ehsan Akhgari
073195c513 Bug 1206298 - Part 2: Add a test to make sure that we respect Cache-Control headers on the synthesized response; r=jdm 2015-10-27 11:58:30 -04:00
Ehsan Akhgari
8bb8104d86 Bug 1218499 - Make FetchEvent.request nullable; r=bzbarsky 2015-10-26 23:00:19 -04:00
Ehsan Akhgari
6a86907c4e Bug 1218151 - Make FetchEventInit.isReload default to false; r=bzbarsky 2015-10-26 23:00:17 -04:00
Ehsan Akhgari
7029e804f8 Bug 1218135 - Remove FetchEvent.client; r=bzbarsky
This has been removed from the spec.  See:
https://github.com/slightlyoff/ServiceWorker/issues/723#issuecomment-123516555
2015-10-26 23:00:16 -04:00
Ehsan Akhgari
61cf88b565 Bug 1214772 - Part 2: Make FetchEvent inherit from ExtendableEvent; r=bzbarsky 2015-10-26 23:00:14 -04:00
Ehsan Akhgari
b17439be5e Bug 1214772 - Part 1: Move the declaration of FetchEvent to after that of ExtendableEvent; r=bkelly 2015-10-26 23:00:13 -04:00
Ehsan Akhgari
28e742e312 Bug 1218146 - Move WindowClient.frameType to Client.frameType; r=bzbarsky 2015-10-26 16:00:00 -04:00
Ehsan Akhgari
c41762a46d Bug 1218142 - Remove ServiceWorkerGlobalScope.onbeforeevicted/onevicted; r=bzbarsky 2015-10-26 15:59:58 -04:00
Ehsan Akhgari
14fbafb7be Bug 1218139 - Remove ServiceWorkerContainer.onreloadpage; r=bzbarsky 2015-10-26 15:59:57 -04:00
Ehsan Akhgari
c43ad45f05 Bug 1218119 - Simplify defining worker prefs; r=baku 2015-10-26 14:06:28 -04:00
Andrea Marchesini
24cd451d65 Bug 1211967 - Fix how we report errors when loading a worker from a data url, r=bz 2015-10-26 17:28:45 +00:00
Ehsan Akhgari
e2a80ec087 Bug 1189685 - Part 1: Ensure that the state of all ServiceWorker instances is up to date when dispatching statechange events; r=bkelly 2015-10-26 12:37:48 -04:00
Ehsan Akhgari
5273912012 Bug 1202001 - Log errors emitted during service worker lifecycle events to the Web Console; r=bkelly 2015-10-26 12:30:46 -04:00
Ehsan Akhgari
80c460d668 Bug 1181054 - Part 3: Correctly handle upload channels that have embedded body headers when dispatching a FetchEvent; r=bkelly 2015-10-26 12:21:03 -04:00
Carsten "Tomcat" Book
3f4ea95cfa Merge m-c to mozilla-inbound 2015-10-26 11:29:00 +01:00
Carsten "Tomcat" Book
758c43af6b merge mozilla-inbound to mozilla-central a=merge 2015-10-26 10:57:35 +01:00
dimi
975b82b179 Bug 1207727 - Add WPT tests for service worker update algorithm. r=bkelly 2015-10-26 11:03:47 +08:00
dimi
0a7f5412e3 Bug 1207727 - Rework updating service workers according to the latest spec. r=bkelly 2015-10-26 10:59:48 +08:00
Victor Porof
9dc0ce6b1a Bug 1202657 - Add markers for workers' message passing and serialization/deserialization, r=smaug, jsantell, tromey, ejpbruel
--HG--
rename : docshell/base/timeline/OTMTMarkerReceiver.h => docshell/base/timeline/MarkersStorage.h
2015-10-21 23:10:05 +02:00
Olli Pettay
a062f00aab Bug 1218190 - Add a pref to enable Clients.openWindow, r=catalinb 2015-10-25 22:36:27 +02:00
Ryan VanderMeulen
4e1540b2b5 Bug 779707 - Add crashtest. 2015-10-25 00:06:24 -04:00
Catalin Badea
cc62c14549 Bug 1172870 - Implement service workers clients.openWindow for desktop (non-e10s). r=baku,smaug
Based on patches from:
  Nikhil Marathe <nsm.nikhil@gmail.com>
  Alberto Crespell Perez <alberto.crespell@gmail.com>
2015-10-24 15:16:23 +03:00
Ehsan Akhgari
bbf58e7a30 Bug 1185558 - Send a "Service-Worker: script" header when downloading service worker scripts; r=bkelly 2015-10-22 17:33:35 -04:00
Ben Kelly
c0ad7f1171 Bug 1212904 P7 Verify xhr respects service worker CORS tainting. r=ehsan 2015-10-22 11:07:32 -07:00
Ben Kelly
d7e898d8d0 Bug 1212904 P4 Set channel tainting in FetchEvent.respondWith(). r=ehsan 2015-10-22 11:07:32 -07:00
Josh Matthews
d3726427db Bug 1173811 - Part 1: Propagate the response URL to intercepted channels when necessary (non-e10s). r=mayhemer,bkelly 2015-10-22 09:23:39 -04:00
Ehsan Akhgari
383397be38 Bug 1216697 - Unship Request.cache until the implementation is finished; r=bzbarsky 2015-10-23 15:38:47 -04:00
Tooru Fujisawa
24ab66bc98 Bug 1217093 - Remove for-each from dom/. r=smaug
--HG--
extra : commitid : DcjxshJqlKg
extra : rebase_source : 23bc9a985f1e6d13e13837e31bb9b88b9be24d55
2015-10-19 02:00:50 +09:00
Phil Ringnalda
6401c0185c Back out 2 changesets (bug 1173811) for test_synthesized_response.js timeouts
CLOSED TREE

Backed out changeset 56bc1314e660 (bug 1173811)
Backed out changeset 0ad51d302ba9 (bug 1173811)
2015-10-21 20:21:05 -07:00
Josh Matthews
591281df75 Bug 1173811 - Part 1: Propagate the response URL to intercepted channels when necessary (non-e10s). r=mayhemer,bkelly 2015-10-21 00:05:40 -04:00
Ehsan Akhgari
8ab0d9d2f8 Bug 931243 - Remove the XMLHttpRequest APIs from ServiceWorkerGlobalScope; r=bzbarsky 2015-10-20 13:16:34 -04:00
Ehsan Akhgari
9d5b088d22 Bug 1189673 - Set FetchEvent.request.headers' guard to immutable before dispatching the FetchEvent; r=bkelly 2015-10-20 10:21:11 -04:00
Nigel Babu
7cb4a2efa8 Backed out changeset 4b38a09cca56 (bug 1189673) for W(4) and W(8) bustages ON A CLOSED TREE 2015-10-20 13:52:22 +05:30
Ehsan Akhgari
34f6acee2f Bug 1189673 - Set FetchEvent.request.headers' guard to immutable before dispatching the FetchEvent; r=bkelly 2015-10-19 21:54:38 -04:00
Jonas Sicking
7bf7cbbd1a Bug 1215746: Remove RequestMode::Cors_with_forced_preflight. r=bkelly 2015-10-19 18:24:36 -07:00
Jonas Sicking
cc10dd7ad3 Bug 1182571: Make nsXMLHttpRequest use AsyncOpen2. r=ehsan 2015-10-19 11:14:54 -07:00
Ehsan Akhgari
ca6a03d7a4 Bug 1198397 - Add a test for interception of requests upgraded through the CSP upgrade-insecure-requests directive; r=jdm 2015-10-19 11:17:10 -04:00
Ehsan Akhgari
6673eddd94 Bug 1198394 - Part 2: Add a test for interception of HSTS upgraded connections; r=jdm 2015-10-19 10:32:38 -04:00
Christoph Kerschbaumer
643f27c257 Bug 1208559 - Hook up ServicerWorkers with CSP (r=sicking,bkelly,dveditz) 2015-10-18 19:59:18 -07:00
Bobby Holley
cd781ec71f Bug 1208559 - Do a CSP Check in ServiceWorkerManager::Register (r=ckerschb) 2015-10-18 19:38:06 -07:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Ehsan Akhgari
9dd6f325b3 Bug 1215601 - Enable service workers for non-release builds on Fennec similar to desktop; r=bkelly 2015-10-16 14:08:08 -04:00
Eddy Bruel
f7c6589364 Bug 1178726 - Simplify how we deal with freezing/thawing workers;r=jlongster,khuey 2015-10-16 18:48:26 +02:00
Ehsan Akhgari
73e2c128c6 Bug 1215230 - Disable service workers and push notifications on non-release builds until we're ready to ship them; r=bkelly 2015-10-16 11:19:57 -04:00
Wes Kocher
c2b3d9275b Backed out 2 changesets (bug 1182571) for being a likely cause of the Android S4 errors
Backed out changeset e2b3064dcace (bug 1182571)
Backed out changeset 8153ae231d16 (bug 1182571)
2015-10-15 14:07:06 -07:00
Jonas Sicking
2578b19458 Bug 1182571: Make nsXMLHttpRequest use AsyncOpen2. r=ehsan 2015-10-15 12:18:21 -07:00
Andrea Marchesini
f93604eafb Bug 1211970 - "Muted errors in workers are not correctly reported to the console". r=bz 2015-10-15 05:05:00 +02:00
Andrea Marchesini
ef38daea39 Bug 1160890, r=smaug 2015-10-15 14:06:55 +02:00
Andrea Marchesini
0d7595b59b Bug 1214300 - AsyncErrorReporter doesn't use JSRuntime param., r=smaug 2015-10-14 11:29:55 +01:00
Morris Tseng
d1d37e3f9b Bug 709490 - Part 10: Using mechanism in RuntimeService to get pref in worker thread instead of gfxPref. r=baku
--HG--
extra : rebase_source : 55ae1e1fc1f88bffd43800eefaed4506789e608c
2015-10-12 11:21:04 +08:00
Morris Tseng
c3d37560cc Bug 709490 - Part 5: Add interfaces test. r=ehsan
--HG--
extra : rebase_source : d5cca4941baf9c5e3fbe05cb7f4d12d860ef1825
2015-10-12 11:21:03 +08:00
Ehsan Akhgari
ac53f535f2 Bug 1179397 - Disallow FetchEvent.respondWith() when the dispatch flag is unset; r=jdm 2015-10-09 13:36:53 -04:00
Ehsan Akhgari
1869e89340 Bug 1212636 - Add a better error message for the content corrupcted error caused by the Promise being passed to FetchEvent.respondWith; r=bkelly 2015-10-07 18:06:26 -04:00
Bill McCloskey
1b6da7ed71 Back out bug 967873 - Test changes for async removeTab 2015-10-07 11:15:11 -07:00
Andrew McCreight
0ff7248107 Bug 1210517 - Create nsVariant directly rather than via do_CreateInstance(). r=froydnj
The goal here is to leave creation stuff mostly for JS, so we can
convert it entirely over to a non-threadsafe cycle-collected version
without breaking any existing C++ users.

I didn't do this for a remaining use in nsGlobalWindow.h to avoid
including nsVariant.h all over the place.
2015-10-07 08:17:42 -07:00
Carsten "Tomcat" Book
08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Eddy Bruel
41c0e5355c Bug 1178721 - Implement SuspendWorkersForWindow;r=khuey 2015-10-07 12:20:59 +02:00
Carsten "Tomcat" Book
e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo
d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Ben Kelly
323efab6af Bug 1210941 P11 Use LOAD_BYPASS_SERVICE_WORKER in worker ScriptLoader. r=ehsan 2015-10-06 06:37:07 -07:00
Ben Kelly
fd3893120c Bug 1210941 P7 Use LOAD_BYPASS_SERVICE_WORKER in ServiceWorkerScriptCache. r=ehsan 2015-10-06 06:37:07 -07:00
Ehsan Akhgari
d826574ea3 Bug 1179401 - Call stopImmediatePropagation() on the Event object in respondWith(); r=jdm 2015-10-05 16:12:28 -04:00
Wes Kocher
0628e22f00 Merge m-c to inbound, a=merge CLOSED TREE 2015-10-05 13:11:26 -07:00
Wes Kocher
7492fb02ac Merge inbound to central, a=merge 2015-10-05 13:02:21 -07:00
Andrew McCreight
5171450b27 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-05 09:38:14 -07:00
Wes Kocher
c1750b75c7 Backed out 11 changesets (bug 709490) for webgl-color-test.html failures a=backout
Backed out changeset fc04c5d43550 (bug 709490)
Backed out changeset cd8f9410d335 (bug 709490)
Backed out changeset 6e687c9143c1 (bug 709490)
Backed out changeset 9b20f2c833c4 (bug 709490)
Backed out changeset f9d130aea88e (bug 709490)
Backed out changeset fc513b410949 (bug 709490)
Backed out changeset acf6220b431a (bug 709490)
Backed out changeset 9bceaf913791 (bug 709490)
Backed out changeset 37fba20111e2 (bug 709490)
Backed out changeset 2285ce1596b8 (bug 709490)
Backed out changeset fb4e09920569 (bug 709490)
2015-10-05 08:28:25 -07:00
Nick Fitzgerald
ee543a3018 Bug 1209263 - Allow embedders to tell SpiderMonkey how to structured clone principals; r=bz
--HG--
extra : rebase_source : 04835c034431953344e83203e7753043461474ba
2015-10-02 16:44:00 +02:00
Nicholas Nethercote
77d38112ab Bug 1209351 (part 2) - Optimize nsTHashTable::RemoveEntry() usage in dom/. r=bz.
--HG--
extra : rebase_source : 8550f181356550b6c0e540c12f61f2d1148d2050
2015-09-24 19:05:16 -07:00
Morris Tseng
f5a52e7dea Bug 709490 - Part 10: Using mechanism in RuntimeService to get pref in worker thread instead of gfxPref. r=baku
--HG--
extra : rebase_source : 07b470b9a8865b7d833932c5425e796b852ab466
2015-10-05 10:50:17 +08:00
Morris Tseng
0b16df6ac0 Bug 709490 - Part 5: Add interfaces test. r=ehsan
--HG--
extra : rebase_source : 306df6c0c7fe3e09e199b5c7b5cd62974b2854c3
2015-10-05 10:50:16 +08:00
Wes Kocher
f0d829220d Backed out changeset 821791826960 (bug 1197893) for Nexus build failures CLOSED TREE 2015-10-02 16:17:05 -07:00
Andrew McCreight
35cd15b8de Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 15:09:02 -07:00
Andrew McCreight
7a2c6267d4 Backed out changeset 6fa9cdf4002b for breaking the build. 2015-10-02 10:49:28 -07:00
Andrew McCreight
404740a102 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 10:42:08 -07:00
Carsten "Tomcat" Book
e91d5a31b6 Merge m-c to mozilla-inbound 2015-10-02 13:37:27 +02:00
Carsten "Tomcat" Book
ca77b70a8d merge mozilla-inbound to mozilla-central a=merge 2015-10-02 11:52:49 +02:00
Ehsan Akhgari
2430b7dcee Bug 1204596 - Part 3: Store the responses with manual redirect in the tests added for bug 1164397; r=bkelly
This needs to be done so that we match the manual redirect mode
for navigations when the response is stored in the cache.
2015-10-01 18:47:07 -04:00
Yoshi Huang
f97211a451 Bug 1167100 - User originAttribute in ContentPrincipalInfo. r=bholley 2015-09-23 18:19:06 +08:00
Catalin Badea
4fa36e326a Bug 1188545 - Disable unstable test: test_aboutserviceworkers.html. a=testonly 2015-09-30 19:11:04 -04:00
Catalin Badea
24a19b6a02 Bug 1188545 - Cancel network interceptions when the service worker is being terminated with unresolved respondWith promises. r=nsm 2015-09-30 19:11:03 -04:00
Catalin Badea
450ddec732 Bug 1188545 - Add tests for service workers' lifetime management. r=nsm 2015-09-30 19:11:03 -04:00
Catalin Badea
1049eff81c Bug 1188545 - Prevent service workers from being terminated while checking if the script evaluation was successful. r=nsm 2015-09-30 19:11:03 -04:00
Catalin Badea
cce3b797b1 Bug 1188545 - respondWith promise should extend the service worker's lifetime. r=nsm 2015-09-30 19:11:03 -04:00
Catalin Badea
518e55a5ed Bug 1188545 - Terminate service workers that have been idle for some time. r=nsm 2015-09-30 19:11:03 -04:00
Catalin Badea
294f7838e4 Bug 1188545 - Cosmetic changes regarding workerPrivate properties shared between shared workers and service workers. r=nsm 2015-09-30 19:11:03 -04:00
Catalin Badea
c5f9033d16 Bug 1188545 - ServiceWorkerRegistrationInfo::Clear() should terminated workers. r=nsm 2015-09-30 19:11:03 -04:00
Catalin Badea
76c7d43fd9 Bug 1188545 - Disentangle service workers from shared workers and refactor event dispatching code into a separate class. r=nsm,mrbkap 2015-09-30 19:11:03 -04:00
Wes Kocher
6fbdec2422 Backed out 12 changesets (bug 1188545) for test_fetch_cors failures CLOSED TREE
Backed out changeset e04738ee72a3 (bug 1188545)
Backed out changeset 1989893b59de (bug 1188545)
Backed out changeset 11ff29cc25d8 (bug 1188545)
Backed out changeset 4b6bdf859845 (bug 1188545)
Backed out changeset 76eb7ffeca2a (bug 1188545)
Backed out changeset 4473e036b52e (bug 1188545)
Backed out changeset 2a28cb794b23 (bug 1188545)
Backed out changeset 1fa2f55727f3 (bug 1188545)
Backed out changeset 032f4c24fc34 (bug 1188545)
Backed out changeset 4be675dc1b37 (bug 1188545)
Backed out changeset d5d05def5b17 (bug 1188545)
Backed out changeset e94f12b0bcf3 (bug 1188545)
2015-09-30 11:11:47 -07:00
Bill McCloskey
633d4a3ecf Bug 967873 - Test changes for async removeTab (r=Gijs) 2015-10-01 21:18:05 -07:00
Jason Orendorff
deb2270515 Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : 6KCxWrCseSZ
extra : rebase_source : 63f3cd6ec1ade43c732ffd9b661fe6f2dca9eb4b
2015-03-20 16:28:59 -05:00
Jason Orendorff
abd42d3ec5 Bug 1054756, part 3 - Implement Symbol.toPrimitive. Replace existing convert hooks with methods. r=jandem.
JSClass::convert is no longer used after this, but to minimize the noise, it will be deleted in a separate patch. However all non-nullptr convert hook implementations must be replaced with [@@toPrimitive] methods in this patch to avoid changing the behavior.

The changes in XrayWrapper.cpp fix a pre-existing bug: when an Xray wrapper tries to emit the "Silently denied access" warning, if id is a symbol, the existing code triggers an error trying to convert it to a string for the warning message. Implementing Symbol.toPrimitive revealed this bug; the fix is straightforward.

--HG--
extra : commitid : B48u39i6pxl
extra : rebase_source : bddefbd7bc131007303a5a00dd9c0bb8fec1b122
2015-03-20 14:02:55 -05:00
Catalin Badea
822a595c5c Bug 1188545 - Disable unstable test: test_aboutserviceworkers.html. a=testonly 2015-09-30 10:14:33 -04:00
Catalin Badea
d2e449fa0d Bug 1188545 - Cancel network interceptions when the service worker is being terminated with unresolved respondWith promises. r=nsm 2015-09-30 10:14:33 -04:00
Catalin Badea
e3772b283b Bug 1188545 - Add tests for service workers' lifetime management. r=nsm 2015-09-30 10:14:33 -04:00
Catalin Badea
4759fba84b Bug 1188545 - Prevent service workers from being terminated while checking if the script evaluation was successful. r=nsm 2015-09-30 10:14:33 -04:00
Catalin Badea
40fb568048 Bug 1188545 - respondWith promise should extend the service worker's lifetime. r=nsm 2015-09-30 10:14:33 -04:00
Catalin Badea
2758d1d2af Bug 1188545 - Terminate service workers that have been idle for some time. r=nsm 2015-09-30 10:14:33 -04:00
Catalin Badea
dbf90d6367 Bug 1188545 - Cosmetic changes regarding workerPrivate properties shared between shared workers and service workers. r=nsm 2015-09-30 10:14:33 -04:00
Catalin Badea
47e2f6ee5c Bug 1188545 - ServiceWorkerRegistrationInfo::Clear() should terminated workers. r=nsm 2015-09-30 10:14:33 -04:00
Catalin Badea
c537f8c503 Bug 1188545 - Disentangle service workers from shared workers and refactor event dispatching code into a separate class. r=nsm,mrbkap 2015-09-30 10:14:33 -04:00
Andrea Marchesini
7373ebaca0 Bug 1209919 - Improving naming and comments in StructuredCloneHelper, r=smaug
--HG--
rename : dom/base/StructuredCloneHelper.cpp => dom/base/StructuredCloneHolder.cpp
rename : dom/base/StructuredCloneHelper.h => dom/base/StructuredCloneHolder.h
2015-09-30 13:22:08 +01:00
Wes Kocher
69c6f1bd2f Merge inbound to central, a=merge 2015-09-29 15:35:49 -07:00
Wes Kocher
df21b43278 Backed out changeset d0e88c95f3c5 (bug 1167100) for crashes a=backout 2015-09-29 10:25:20 -07:00
Kyle Huey
ca2010bbb9 Bug 1208687: Only discard events from the outermost queue. r=ehsan
When workers shut down we discard the event queue rather than running it to completion.  Originally workers managed their event queue themselves and would simply iterate through the array of events and cancel them all.  After bug 914762 this was done by setting a (thread-)global "canceling" flag and then calling NS_ProcessPendingEvents.  But this neglects that a shut down request can be received while the worker is in a sync queue.  In this case, calling NS_ProcessPendingEvents will process any events pending in the sync queue, which is *not* the queue we need to cancel.

The fix is, if we are in a sync queue when NotifyInternal is called, to defer clearing the queue until the top-most sync queue is destroyed and we are about to return to the regular event queue.  Only then can we call NS_ProcessPendingEvents to clear out the queue.  Because we can never process any events from this queue while sync queues are active, the timing of the mass cancellation is unchanged from the perspective of events in the regular queue.
2015-09-28 14:34:28 -07:00
Carsten "Tomcat" Book
363e40e298 merge mozilla-inbound to mozilla-central a=merge 2015-09-28 14:13:24 +02:00
Nigel Babu
85f8d8c65e Backed out changeset ee27fc2f6a1d (bug 1208687) for W(4) bustage
ON A CLOSED TREE
2015-09-28 12:23:36 +05:30
Kyle Huey
ea0bfdd061 Bug 1208687: Only discard events from the outermost queue. r=ehsan
When workers shut down we discard the event queue rather than running it to completion.  Originally workers managed their event queue themselves and would simply iterate through the array of events and cancel them all.  After bug 914762 this was done by setting a (thread-)global "canceling" flag and then calling NS_ProcessPendingEvents.  But this neglects that a shut down request can be received while the worker is in a sync queue.  In this case, calling NS_ProcessPendingEvents will process any events pending in the sync queue, which is *not* the queue we need to cancel.

The fix is, if we are in a sync queue when NotifyInternal is called, to defer clearing the queue until the top-most sync queue is destroyed and we are about to return to the regular event queue.  Only then can we call NS_ProcessPendingEvents to clear out the queue.  Because we can never process any events from this queue while sync queues are active, the timing of the mass cancellation is unchanged from the perspective of events in the regular queue.

--HG--
extra : rebase_source : f67fbee27c0751068a4e7aaf692cbfc1d3c9aa7c
2015-09-27 21:57:36 -07:00
Yoshi Huang
872722fe37 Bug 1167100 - User nsIPrincipal.originAttribute in ContentPrincipalInfo. r=bholley 2015-09-23 18:19:06 +08:00
Ehsan Akhgari
3aafaa38cb Bug 1207603 - Increase the timeout of test_third_party_iframes.html to give it enough time to pass on Android debug 2015-09-27 11:31:14 -04:00
Wes Kocher
8631de9c2b Backed out 13 changesets (bug 709490) for android webgl-color-test.html failures
Backed out changeset 5be7514914b6 (bug 709490)
Backed out changeset 04b6f94fbe8a (bug 709490)
Backed out changeset 00c0e85dd8cd (bug 709490)
Backed out changeset 221385b7b81a (bug 709490)
Backed out changeset ecc38c18734f (bug 709490)
Backed out changeset 22878c936384 (bug 709490)
Backed out changeset 0edcbb60eee3 (bug 709490)
Backed out changeset 5feceec2014b (bug 709490)
Backed out changeset 835b655cb873 (bug 709490)
Backed out changeset 6fbb4a3f8cf7 (bug 709490)
Backed out changeset a5f8646fa156 (bug 709490)
Backed out changeset 2ae1386916b3 (bug 709490)
Backed out changeset 6b29a2a0a8fb (bug 709490)
2015-09-29 08:57:36 -07:00
Benjamin Bouvier
26ee0d3f6b Bug 1206520: Add about:config prefs to enable throwing on asm.js validation failures; r=bz
--HG--
extra : commitid : 1mieasAF71F
extra : rebase_source : b7b9d3aae9158b12b75cf9f29203925265b0510f
extra : amend_source : 2c625d7ffa6c9b6f7ac48dcfc347c0119b459579
extra : histedit_source : 05e9b9b9cabf675bd4c742c8fe1d3b02735819c2
2015-09-28 12:40:03 +02:00
Morris Tseng
d99c93a009 Bug 709490 - Part 10: Using mechanism in RuntimeService to get pref in worker thread instead of gfxPref, r=baku 2015-09-29 11:51:25 +01:00
Morris Tseng
bfd37a1ffc Bug 709490 - Part 5: Add interfaces test, r=ehsan 2015-09-29 11:51:24 +01:00
Wes Kocher
b19d88b060 Backed out 7 changesets (bug 1206168, bug 1177318, bug 1054756) for hazard build failures CLOSED TREE
Backed out changeset e892727a373a (bug 1206168)
Backed out changeset 6c93d1044b7e (bug 1054756)
Backed out changeset 105433ce195b (bug 1054756)
Backed out changeset 13128a88f2b9 (bug 1054756)
Backed out changeset c250abf4fd17 (bug 1054756)
Backed out changeset fc9fef646a97 (bug 1054756)
Backed out changeset c8897f109a08 (bug 1177318)
2015-09-23 12:31:19 -07:00
Andrea Marchesini
144da2ac21 Bug 1205676 - Enable WPT service-worker/unregister-then-register-new-script.https.html in e10s, r=nsm 2015-09-23 19:40:51 +01:00
Andrea Marchesini
a99df4ccc7 Bug 1207635 - get rid of dom.workers.sharedWorkers.enabled pref, r=khuey 2015-09-23 19:33:40 +01:00
Jason Orendorff
54e92d9beb Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : KrjkP1flM3c
extra : rebase_source : 8c367e3158528e92ac8ebc51521d32472f1e5bb1
2015-03-20 16:28:59 -05:00
Jason Orendorff
81838ba2bd Bug 1054756, part 3 - Implement Symbol.toPrimitive. Replace existing convert hooks with methods. r=jandem.
JSClass::convert is no longer used after this, but to minimize the noise, it will be deleted in a separate patch. However all non-nullptr convert hook implementations must be replaced with [@@toPrimitive] methods in this patch to avoid changing the behavior.

The changes in XrayWrapper.cpp fix a pre-existing bug: when an Xray wrapper tries to emit the "Silently denied access" warning, if id is a symbol, the existing code triggers an error trying to convert it to a string for the warning message. Implementing Symbol.toPrimitive revealed this bug; the fix is straightforward.

--HG--
extra : commitid : Bod43vTkd1o
extra : rebase_source : 0cd6b8e3e7046952631b1b471430c5ab5002c7d8
2015-03-20 14:02:55 -05:00
Chris Peterson
71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
dimi
98c100092c Bug 1143717 - Implement the ServiceWorkerMessageEvent interface. r=baku
--HG--
extra : rebase_source : 7ff8853c04d5c2c09cbfb9ec20f248df1233486a
2015-09-22 16:56:48 +08:00
Andrea Marchesini
abdc1eebce Bug 1193414 - SharedWorkers thread should be kept alive also when the SharedWorker object is CCed, r=khuey 2015-09-23 06:54:29 +01:00
Nikhil Marathe
48d53f38df Bug 1184798 - Ensure workers loads are treated as non-subresource fetches. r=jdm
--HG--
extra : commitid : KSrA2sDx3MI
extra : rebase_source : c28988811316aa40e38752669a928d27750001b6
2015-09-17 11:56:41 -07:00
Henry Chang
b6b5862949 Bug 1163254 - Add signedPkg to OriginAttributes. r=bholley 2015-09-18 15:11:58 +08:00
Ehsan Akhgari
5d40efa578 Bug 1206894 - Enable asynchronous dispatching of fetch events; r=jdm
This refactoring patch separates the preparation of the fetch event
object from its dispatching, so that consumers would be able to
dispatch the event asynchronously.
2015-09-21 20:59:27 -04:00
Christoph Kerschbaumer
2fac10d123 Bug 1048048 - add preload content policy types for scripts (r=baku)
--HG--
extra : source : 450d4a13c90e95a58caa398e4fcc0a71f4800071
2015-09-20 14:56:21 -07:00
Wes Kocher
cd079d2bf9 Backed out 7 changesets (bug 1048048) for android crashes in various chunks CLOSED TREE
Backed out changeset b5abe23a4ea5 (bug 1048048)
Backed out changeset 4f91b10e8be0 (bug 1048048)
Backed out changeset 450d4a13c90e (bug 1048048)
Backed out changeset 6a727c40eb68 (bug 1048048)
Backed out changeset 88c2333ff745 (bug 1048048)
Backed out changeset 740ab1ecd079 (bug 1048048)
Backed out changeset 02c6d6aef163 (bug 1048048)
2015-09-21 09:08:34 -07:00
Christoph Kerschbaumer
c938714dba Bug 1048048 - add preload content policy types for scripts (r=baku) 2015-09-20 14:56:21 -07:00
Mike Hommey
538706caba Bug 1203840 - Trigger dirty pages purge after CC. r=njn,r=smaug,r=mccr8
Jemalloc 4 purges dirty pages regularly during free() when the ratio of dirty
pages compared to active pages is higher than 1 << lg_dirty_mult.  We set
lg_dirty_mult in jemalloc_config to limit RSS usage, but it also has an impact
on performance.

So instead of enforcing a high ratio to force more pages being purged, we keep
jemalloc's default ratio of 8, and force a regular purge of all dirty pages,
after cycle collection.

Keeping jemalloc's default ratio avoids cycle-collection-triggered purge to
have to go through really all dirty pages when there are a lot, in which case
the normal jemalloc purge during free() will already have kicked in. It also
takes care of everything that doesn't run the cycle collector still having
a level of purge, like plugins in the plugin-container.

At the same time, since jemalloc_purge_freed_pages does nothing with jemalloc 4,
repurpose the MEMORY_FREE_PURGED_PAGES_MS telemetry probe to track the time
spent in this cycle-collector-triggered purge.
2015-09-20 17:43:43 +09:00
Bobby Holley
15e1767e1c Bug 1189668 - Check CSP before completing channel interception. r=ehsan 2015-09-20 00:32:14 -07:00
Kit Cambridge
7f516ea381 Back out bug 1205109 for Push mochitest failure.
--HG--
extra : commitid : 8uF5cA3R489
extra : rebase_source : 32dcfc2a2816dabecb7a102d7b44b8f2d2c89160
2015-09-18 18:15:23 -07:00
Kit Cambridge
731f585e6c Bug 1205109 - Make pushsubscriptionchange extendable. r=mt,nsm
--HG--
extra : commitid : 4ziWEfRBlb4
extra : rebase_source : 8998aaf2f21825c93aba12de2a8543ecb64d7c1b
2015-09-17 05:15:45 -07:00
Kit Cambridge
556109257e Bug 1205112 - Make PushEvent.data nullable. r=mt,smaug
--HG--
extra : commitid : 8kofiFgB7WB
extra : rebase_source : 1ff780efd336a9a4214800149c397d9fd3fd6429
2015-09-17 05:13:04 -07:00
Kit Cambridge
cc7189cb64 Bug 1149195 - Expose push message data accessors. r=nsm,dragana,smaug
--HG--
extra : commitid : 10hopC95zuL
extra : rebase_source : c3c9cfac62d1acb234bba2f16b443783354c43a4
2015-09-17 05:10:42 -07:00
Nikhil Marathe
6d235278db Bug 1203324 - disable notifications on serviceworkers. r=ehsan,wchen
Per the product discussion, the Notification API should be disabled in
ServiceWorker in release builds for 42 since the UX isn't great [1].

The aim is to release in 44.

Apologies for the code duplication for pref checking in Notification and
ServiceWorkerRegistration. There isn't a easy way to get
ServiceWorkerRegistration's generated binding to include Notification.h without
having an attribute/method that uses Notification.

[1]: https://mana.mozilla.org/wiki/x/TgAJAw

--HG--
extra : commitid : 5dtc2E63kuM
extra : rebase_source : 4265dcd154462aa4f3b915e9e898fe7b82bf9afc
2015-09-15 12:58:32 -07:00
Carsten "Tomcat" Book
c5551bace9 Backed out 2 changesets (bug 1169633, bug 1163254) for linux Mn-e10s test bustage on a CLOSED TREE
Backed out changeset 47ccf6689101 (bug 1169633)
Backed out changeset 503eab197a2d (bug 1163254)
2015-09-17 16:01:25 +02:00
hchang
2e884ff477 Bug 1163254 - Add signedPkg to OriginAttributes. r=bholley 2015-09-16 19:42:00 +02:00
Albert Crespell
b2e334e690 Bug 1182113 - Test XSLT serviceworker load. r=bkelly 2015-09-10 12:42:02 +02:00
Phil Ringnalda
92751c5b3e Back out 3 changesets (bug 1204596) for b2g test_fetch_cors.html failures
Backed out changeset 2662a1ad4cad (bug 1204596)
Backed out changeset cfc4c4ecbbf5 (bug 1204596)
Backed out changeset d10c6f32ce46 (bug 1204596)
2015-09-16 20:51:17 -07:00
Nicholas Nethercote
f429eae6a5 Bug 1203427 (part 5) - Add logging of timer firings. r=froydnj. 2015-09-10 00:50:51 -07:00
Ehsan Akhgari
3792ea0f2a Bug 1204397 - Fix the test expectations to expect service workers to be enabled only on Nightly for Fennec; r=baku
The semantics of the new attributes are as follows:
* nightlyAndroid only takes effect on Android.
* If both nightlyAndroid and android are specified, nightlyAndroid takes
* precedence.

These two rules allow us to check for the current situation.
2015-09-16 23:10:03 -04:00
Ehsan Akhgari
622b6a36e2 Bug 1204596 - Part 3: Store the responses with manual redirect in the tests added for bug 1164397; r=bkelly
This needs to be done so that we match the manual redirect mode
for navigations when the response is stored in the cache.
2015-09-16 20:38:23 -04:00
Ehsan Akhgari
59c135c176 Bug 1198078 - Add support for TYPE_INTERNAL_SERVICE_WORKER; r=ckerschb,tanvi 2015-09-16 19:15:30 -04:00
Andrea Marchesini
f0aa7a8c5f Bug 1204775 - SharedWorker.port should be a 'real' MessagePort, r=khuey 2015-09-16 11:27:56 +08:00
Shu-yu Guo
64db2267cf Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Wes Kocher
ab3e843b68 Backed out changeset ccfddcbccdac (bug 1204775) for sharedworker bustage 2015-09-15 11:08:09 -07:00
Ben Kelly
061dd411a3 Bug 1203680 P5 Make ServiceWorkerManager ensure channel upload stream is cloneable. r=nsm 2015-09-15 10:15:45 -07:00
Ben Kelly
bc6fd423a1 Bug 1203680 P1 Test file blob uploads with service worker interception. r=nsm 2015-09-15 10:15:45 -07:00
Andrea Marchesini
ff25288854 Bug 1204775 - SharedWorker.port should be a 'real' MessagePort, r=khuey 2015-09-16 00:47:19 +08:00
Wes Kocher
a336f83a0a Backed out 9 changesets (bug 1203680) for mochitest bustage CLOSED TREE
Backed out changeset e4733b9eb53c (bug 1203680)
Backed out changeset fb33eb2a55b0
Backed out changeset eb42e21bbb96 (bug 1203680)
Backed out changeset 86642d84e604 (bug 1203680)
Backed out changeset 1026da4b02fb (bug 1203680)
Backed out changeset 311f9810e0b3 (bug 1203680)
Backed out changeset 6fedc85dc0d9 (bug 1203680)
Backed out changeset b25230c0a193 (bug 1093357)
Backed out changeset 2369d63ef14a (bug 1203680)
2015-09-14 14:27:57 -07:00
Wes Kocher
b4b28bfb9d Backed out 2 changesets (bug 1204397) for serviceworkers bustage
CLOSED TREE?

Backed out changeset 01cf8bf2f3d7 (bug 1204397)
Backed out changeset 6abdb99b2b30 (bug 1204397)
2015-09-14 12:46:57 -07:00
Ben Kelly
65770e7d7b Bug 1203680 P5 Make ServiceWorkerManager ensure channel upload stream is cloneable. r=nsm 2015-09-14 12:04:56 -07:00
Ben Kelly
2da1208f50 Bug 1203680 P1 Test file blob uploads with service worker interception. r=nsm 2015-09-14 12:04:56 -07:00
Ehsan Akhgari
1f3d931c95 Bug 1204397 - Part 2: Recover from a double negative trap, r=me 2015-09-14 14:22:49 -04:00
Nikhil Marathe
d5c8bfc780 Bug 1197012 - Fix ThrowTypeError in Notification. r=mccr8
--HG--
extra : commitid : EfR8HuHT7WA
extra : rebase_source : 9d713b3293a1b0e08f2be6015a81a179e4aa1c0e
2015-08-20 22:18:49 -07:00
Ehsan Akhgari
474c7a9e36 Bug 1204397 - Fix the test expectations to expect service workers to be enabled only on Nightly for Fennec; r=baku 2015-09-14 12:26:51 -04:00
Josh Matthews
6841a351b6 Bug 1198544 - Prevent FetchDriver from creating multiple responses if OnStopRequest yields a failing status code. r=nsm 2015-09-14 11:05:35 -04:00
Michael Layzell
0097c41e01 Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
Michael Layzell
fb6ddae47f Bug 1200337 - Part 1: Don't expose standard HTTP headers during interception in non-e10s mode, r=mcmanus 2015-09-12 12:46:09 -04:00
Botond Ballo
04bf303d99 Bug 1198451 - Disambiguate mozilla::dom::Function from mozilla::Function. r=froydnj
--HG--
extra : source : aa0c472e2f7ed9ca9f71682c47f19d5f4b880e7d
2015-09-11 17:25:23 -04:00
Wes Kocher
bab9b5abf4 Backed out changeset 132aa442af95 (bug 1198544) for browser_ManifestObtainer_obtain.js failures CLOSED TREE 2015-09-11 11:53:52 -07:00
Josh Matthews
7e4893bc7a Bug 1198544 - Prevent FetchDriver from creating multiple responses if OnStopRequest yields a failing status code. r=nsm 2015-09-11 13:23:29 -04:00
Nicholas Nethercote
ef4348692c Bug 1203357 - Fix MSVC warning in dom/workers/test/gtest/TestReadWrite.cpp. r=baku.
The particular warning here was complaining about an unsafe comparison between
a uint32_t and a bool.

Also, remove ALLOW_COMPILER_WARNINGS=True for this directory.

--HG--
extra : rebase_source : e2ce5c425a48bf9cf29182f222d1f2dd44eb9bc8
2015-09-10 08:02:30 -07:00
Nikhil Marathe
cd9d0eb7ab Bug 1198230 - Respect FetchEvent.preventDefault(). r=jdm
Update web-platform-tests expected data

--HG--
extra : commitid : 4dM6kivKeAc
extra : rebase_source : 64e40258a98b79064d5073422811fb8e1f688735
2015-09-04 12:00:24 -07:00
Ehsan Akhgari
0cb3e73aaa Bug 1203160 - Part 2: Fix the interfaces tests to allow SW interfaces for non-release Fennec; r=baku 2015-09-10 01:05:17 -04:00
Ehsan Akhgari
06394a9a8b Bug 815299 - Part 3: Accept empty HTTP headers in XHR; r=jdm 2015-09-09 07:54:33 -04:00
Ehsan Akhgari
0d3d9044a6 Bug 815299 - Part 2: Accept empty HTTP headers in fetch; r=jdm 2015-09-09 07:53:50 -04:00
Nigel Babu
2ac21d8fc7 Backed out changeset 3555d4b1ab1e (bug 815299) for M4 bustage. 2015-09-09 09:12:31 +05:30
Nigel Babu
ee4f599e0f Backed out changeset 0a2a9972b4c7 (bug 815299) for M4 bustage. 2015-09-09 09:12:28 +05:30
Nigel Babu
14c4d4b047 Backed out changeset 9f3adfd2ca52 (bug 815299) for M4 bustage. 2015-09-09 09:12:24 +05:30
Ehsan Akhgari
3625cc93e2 Bug 815299 - Part 4: Address jdm's review comments 2015-09-08 20:38:33 -04:00
Ehsan Akhgari
617067e78e Bug 815299 - Part 3: Accept empty HTTP headers in XHR; r=jdm 2015-09-08 20:08:32 -04:00
Ehsan Akhgari
4d0639bd0c Bug 815299 - Part 2: Accept empty HTTP headers in fetch; r=jdm 2015-09-08 20:08:31 -04:00
Andrea Marchesini
893e3bb469 Bug 1198814 - Use StructuredCloneHelper in PromiseWorkerProxy, r=smaug 2015-09-05 12:22:13 +03:00
Nikhil Marathe
548809dc68 Bug 1197421 - Fix promise worker proxy cleanup and update callers. r=catalinb
Get rid of having users dispatch control runnables. It was error prone and
required too much reasoning. It was also possible to end up in a state where
callers would dispatch a WorkerRunnable, which would succeed, so they would not
dispatch a WorkerControlRunnable. Then the worker would stop Running,
canceling and releasing the runnable leading to releasing the proxy in an
unclean state. Instead, we AddRef() and add the feature and remove the feature
and Release() on Notify(). If callers successfully run a WorkerRunnable they
clean the proxy. If not, the proxy stays alive until the worker switches to
Canceling state.

--HG--
extra : commitid : BnnijSibVYe
extra : rebase_source : 15f6810dfbd0c88a983196de401c55e782b1d1d8
2015-09-02 10:07:26 -07:00
Andrea Marchesini
efd3b25c78 Bug 1198795 - ipc/StructuredCloneUtils should be merged with StructuredCloneHelper, r=smaug
--HG--
rename : dom/ipc/StructuredCloneUtils.cpp => dom/ipc/StructuredCloneIPCHelper.cpp
rename : dom/ipc/StructuredCloneUtils.h => dom/ipc/StructuredCloneIPCHelper.h
2015-09-02 17:20:30 +01:00
Ben Kelly
d280435063 Bug 1184967 P3 Switch mochitest redirect tests back to returning a CORS Response. r=nsm 2015-09-01 07:58:34 -07:00
Ben Kelly
3cc300f189 Bug 1184967 P1 Set RequestMode based on LoadInfo securityMode and client request content policy. r=nsm 2015-09-01 07:58:34 -07:00
Ben Kelly
1da0e73e32 Bug 1184607 P8 Fix mochitests to store opaqueredirect responses in Cache for navigation URLs. r=nsm 2015-08-31 14:26:30 -07:00
Ben Kelly
10350eb242 Bug 1184607 P4 Handle the RequestRedirect mode during service worker interception. r=nsm
* * *
Bug 1184607 P4 interdiff 001 fix manual redirect assertion for navigations r=nsm
* * *
Bug 1184607 P4 interdiff 002 dom/worker nits
2015-08-31 14:26:29 -07:00
Ehsan Akhgari
db2d2576d7 Bug 1199693 - Test CORS preflight interception with and without an internal redirect; r=jdm 2015-08-31 08:45:56 -04:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Kyle Huey
d6d7537d63 Bug 1198982: Test fixups. r=me 2015-08-30 11:42:28 -07:00
Kyle Huey
d4f49ff9e9 Bug 1198982: Don't fail the SW load for an importScripts failure. r=bkelly 2015-08-30 10:31:52 -07:00
Michael Layzell
cd6e65d4d5 Bug 1147821 - Update IndexedDB to use common StorageAllowedForWindow logic, r=khuey 2015-08-28 10:10:30 -04:00
Nikhil Marathe
1c97261710 Bug 1176988 - Patch 3 - Tests. r=jdm
Update web-platform-tests expected data

--HG--
extra : commitid : KmmRlr87yvj
extra : rebase_source : 7e7ba00d6f0da2c0dfdfe98c50675d4721a6f2a2
2015-08-26 08:59:04 -07:00
Andrea Marchesini
fdbfd864e7 Bug 1186307 - StructuredCloneHelper in workers.postMessage(), r=smaug 2015-08-27 17:19:13 +01:00
Nigel Babu
d5f46aaf6c Backed out a19daae11647 (Bug 1186307) for W8 and W4 bustage on CLOSED TREE 2015-08-27 15:04:25 +05:30
Andrea Marchesini
b68734b7da Bug 1186307 - StructuredCloneHelper in workers.postMessage(), r=smaug 2015-08-27 09:06:09 +01:00
Phil Ringnalda
700dfcd3d1 Back out f9edb5fe8fb9 (bug 1198982) for webplatform registration.https.html failures
CLOSED TREE
2015-08-26 21:36:40 -07:00
Kyle Huey
517ebc93c6 Bug 1198982: Don't fail the SW load for an importScripts failure. r=bkelly 2015-08-26 19:21:03 -07:00
Nikhil Marathe
fe819ad8d7 Bug 1180861 - Various ServiceWorker registration fixes to get test passing. r=bkelly,jgraham.
This commit implements the following changes to get registration.https.html working.
1) Fail with NS_ERROR_DOM_SECURITY_ERR where the spec requires it.
2) Propagate JSExnType to ServiceWorkerManager::HandleError() so that a JS
   exception object with the correct .name can be created.
3) Fail with security error on redirect failure.
4) Check fetched script's mimetype.
5) Add missing python server files for web-platform-tests.
6) Update web-platform-tests expected data.
7) Several tests have been changed to use TypeError or more appropriate JS
   errors based on my reading of the spec.

--HG--
extra : commitid : IxWo2IVUweU
extra : rebase_source : c3c1ead153027bf84e7f239fd7125224fe25c3c0
2015-08-19 16:21:25 -07:00
Andrea Marchesini
24bd2e4412 Bug 1185640 - serviceworker register() should not accept escaped slashes. r=bkelly
--HG--
extra : commitid : 7XFc06lyJkq
extra : rebase_source : 4be886456a92e53e69ac35afd5213d7b7751cb7c
2015-08-19 13:23:58 -07:00
Kyle Huey
0b8e80b981 Bug 1164834: MessageEvents coming from postMessage should not be cancelable. r=Ms2ger 2015-08-25 13:30:19 -07:00
Nikhil Marathe
c04b01b1ed Bug 1189675 - Make all ServiceWorker events non cancelable. r=catalinb
Update web-platform-tests expected data

--HG--
extra : commitid : 5HEP46MV77P
extra : rebase_source : 5234b551a4e9cf2bf014f4ee0396d9dcdd9f6dac
2015-08-21 17:38:18 -07:00
Nikhil Marathe
b540329bb9 Bug 1189644 - Update waitUntil() and activation to spec. r=catalinb
waitUntil() has been updated to accept multiple calls and concatenate them into Promise.all().
activation does not fail any more even if the promise(s) passed to waitUntil() reject.

Update web-platform-tests expected data

--HG--
extra : commitid : IawOgxEfc79
extra : rebase_source : e6fcc47c873fd9f71f51a67303a6566bf0c0dd21
extra : amend_source : 787990406129722a3c58ff78782d778823daf2bf
2015-08-24 14:42:14 -07:00
Ryan VanderMeulen
ad4abd6428 Backed out 7 changesets (bug 1189678, bug 1193128, bug 1189661, bug 1189644, bug 1189675) for various serviceworker mochitest and wpt failures.
Backed out changeset 696463139720 (bug 1189661)
Backed out changeset 7babb5b9d74a (bug 1189644)
Backed out changeset d4fa5cfc4b86 (bug 1189678)
Backed out changeset a7c27770b861 (bug 1189675)
Backed out changeset 471a45b97ce2 (bug 1189644)
Backed out changeset 4d96f2d48077 (bug 1193128)
Backed out changeset a9d5366288ff (bug 1189661)

CLOSED TREE
2015-08-24 18:09:47 -04:00
Nikhil Marathe
680d1fe469 Bug 1189644 - Follow up to fix test. a=bustage
CLOSED TREE

--HG--
extra : commitid : 5MFDWqWODAV
extra : amend_source : 9ea1f0c0ea7f99ff4267f435454895fd9522d43b
2015-08-24 13:54:25 -07:00
Jose Antonio Olivera Ortega
3ff1bb96f6 Bug 1182103 - Test EventSource scenarios with fetch interception. r=bkelly 2015-08-24 06:32:00 -04:00
Nikhil Marathe
d812469212 Bug 1189675 - Make all ServiceWorker events non cancelable. r=catalinb
Update web-platform-tests expected data

--HG--
extra : commitid : 61GwTtITUOa
extra : rebase_source : e5b0dfe482d4104cdab97c511e09c4b346f0eacd
2015-08-21 17:38:18 -07:00
Nikhil Marathe
0a089b35b0 Bug 1189644 - Update waitUntil() and activation to spec. r=catalinb
waitUntil() has been updated to accept multiple calls and concatenate them into Promise.all().
activation does not fail any more even if the promise(s) passed to waitUntil() reject.

Update web-platform-tests expected data

--HG--
extra : commitid : 1jnUWlyw4zQ
extra : rebase_source : 3e2ac14a2f1ebc6fbfc322bb1914feb47f261349
2015-08-21 16:13:54 -07:00
dimi
888dac0c00 Bug 1187766 - Test loading plugins scenarios with fetch interception. r=bkelly 2015-08-21 15:09:46 +08:00
Nikhil Marathe
1c3ca8257a Bug 1194562 - Pass wide strings to ThrowTypeError. r=mccr8 2015-08-18 12:59:44 -07:00
dimi
04198b30cb Bug 1189235 - Use originAttribute for ServiceWorkerRegistrar. r=baku 2015-08-20 18:20:19 +08:00
Nikhil Marathe
0047229d92 Bug 1187350 - update() should return a Promise. r=ehsan,catalinb
--HG--
extra : commitid : 2SkKnobC9jo
extra : rebase_source : 5f5d5c3ca57237fb63044c66a48861a1a4bf19f3
extra : amend_source : 5ea042fc5cc2be52594eca1fd6cda2f36057b3eb
2015-08-14 15:06:00 -07:00
Nikhil Marathe
0756a03abe Bug 1181056 - waitUntil() should throw if called when event is not dispatching. r=smaug
--HG--
extra : commitid : 5Caz3xiFQQe
extra : rebase_source : ef708cda07cbaf897ec3201e19defcf02d85e06f
2015-08-18 16:28:04 -07:00
Nikhil Marathe
5cf1847cde Bug 1181037 - Use entry settings object's base URL. r=ehsan
The second test, which checks for NetworkError is incorrect.
[[Update]] step 12 states:
"If response is a network error or response's status is not in the range 200 to 299, then:
  1. Reject p with a TypeError."

which specifically converts the NetworkError (due to 404) to a TypeError.

Also fixes controller-on-reload.https.html

Update web-platform-tests expected data

--HG--
extra : commitid : LUdPR44iiv2
extra : rebase_source : 6774faa1417ce585161750f14bf233d7382bea68
2015-08-20 13:56:37 -07:00
Salvador de la Puente
ba23b80bbc Bug 1196157 - Marks left by performance marks should print the domain of the application and not the complete URL. r=baku 2015-08-20 14:34:22 -07:00
dimi
758be55430 Bug 1191647 - Listen to clear-origin-data in ServiceWorkerManager.cpp. r=bkelly
--HG--
extra : source : ee8d28602bc21f5d5c32c66e3bb7e3e78d18ad4f
2015-08-19 14:46:53 +08:00
Nigel Babu
d78ab7197e Backed out changeset f447f7b8190b (bug 1185640) for W8 failures on CLOSED TREE
--HG--
extra : amend_source : 1fca18be89fda404fb71c3f0c8550011ded2d7de
2015-08-20 16:12:00 +05:30
Andrea Marchesini
c59e2e345a Bug 1185640 - ServiceWorkers - Passing a scope or scriptURL to register() with escaped '/' or '\' should fail, r=bkelly 2015-08-20 08:46:01 +01:00
Andrea Marchesini
ce594e8b18 Bug 1196514 - remove dom.messagechannel.enabled pref, r=smaug 2015-08-20 08:34:38 +01:00
Wes Kocher
7548b216ca Backed out changeset ee8d28602bc2 (bug 1191647) for build bustage CLOSED TREE 2015-08-19 15:55:05 -07:00
dimi
04c040ba8d Bug 1191647 - Listen to clear-origin-data in ServiceWorkerManager.cpp. r=bkelly
--HG--
extra : rebase_source : 9401b09e0d6708fa8455d8629a321569a6e6abe9
2015-08-19 14:46:53 +08:00
Andrea Marchesini
d8e7c636ae Bug 1192350 - XMLHttpRequest::Open() should check if mProxy has been already released in a nested ::Open() calls, r=khuey 2015-08-19 18:26:13 +01:00
Bill McCloskey
c2ac89de85 Bug 1163735 - Ensure that we don't hand out a destroyed TabChild from WorkerPrivate::InterfaceRequestor (r=khuey)
If the actor we hand out has been __delete__d, then we'll crash when
Necko tries to send the actor to the parent to open connections.
2015-08-19 09:40:55 -07:00
Nikhil Marathe
b5681e95be Bug 1193911 - Ensure synthetic Responses gets a valid channel info. r=ehsan
Right now, synthetic Responses did not have a valid channel info. When these
were saved in the Cache, and then restored, the restored Response did have
a ChannelInfo, but that ChannelInfo did not have a valid security info.
Passing this to respondWith() then caused the interception to fail.

This patch modifies Response::Constructor() to initialize its ChannelInfo from
the global. ChannelInfo can now initialize itself from a nsIDocument. All
workers now store their ChannelInfo on the WorkerLoadInfo.

--HG--
extra : commitid : L1wltwPICd8
extra : rebase_source : 8dab4c414eb50e02a00dd2cb3ee848b811060e70
2015-08-17 15:08:58 -07:00
Jinank Jain
f67a04e158 Bug 1162333 - Add stronger assertions to PromiseWorkerProxy in debug builds. r=catalinb
--HG--
extra : commitid : 2jVPtywuF92
extra : rebase_source : 85d8854a7f3eec8c1fd31ed0e57f33d3b83a2d04
2015-06-11 00:35:18 +02:00
Hiroyuki Ikezoe
07f62b2d0a Bug 1165796 - Part 2: Implement PerformanceObserver.r=baku
--HG--
extra : rebase_source : 9ccd3f9c8932841aed6a13986a4466fac0197902
2015-08-17 15:13:20 -07:00
Catalin Badea
04bb71d075 Bug 1193133 - Throw when calling postMessage from a Service Worker dom object with no global. r=bkelly 2015-08-17 10:38:34 -07:00
Catalin Badea
678a410089 Bug 1193133 - Drop the document and window references from ServiceWorker. r=bkelly 2015-08-17 10:38:34 -07:00
Ryan VanderMeulen
61f091d8c5 Backed out changesets 2381f29f63c2 and 9f2469ea7f01 (bug 1193133) for frequent w-p-t crashes/asserts. a=me 2015-08-14 09:00:59 -04:00
Catalin Badea
7de33f8307 Bug 1193133 - Throw when calling postMessage from a Service Worker dom object with no global. r=bkelly 2015-08-13 13:35:10 -07:00
Catalin Badea
d6eb43737c Bug 1193133 - Drop the document and window references from ServiceWorker. r=bkelly 2015-08-13 13:35:10 -07:00
Ryan VanderMeulen
1e86901d36 Backed out changeset 4a8f45990368 (bug 1185640) for causing serviceworker w-p-t permacrashes.
CLOSED TREE
2015-08-13 10:13:55 -04:00
Andrea Marchesini
2792224a7f Bug 1185640 - Passing a scope or scriptURL to register() with escaped '/' or '\' should fail, r=bkelly 2015-08-13 11:34:52 +01:00
Andrea Marchesini
5a264a19df Bug 1187470 - ServiceWorker scripts should not be treated parser warnings as errors, r=bkelly
--HG--
rename : dom/workers/test/serviceworkers/strict_mode_error.js => dom/workers/test/serviceworkers/strict_mode_warning.js
rename : dom/workers/test/serviceworkers/test_strict_mode_error.html => dom/workers/test/serviceworkers/test_strict_mode_warning.html
2015-08-13 10:52:15 +01:00
Albert Crespell
8e93c098d1 Bug 1182120 - Test XMLDocument.load() with fetch interception. r=bkelly 2015-08-12 06:43:27 +02:00
Andrea Marchesini
a2c5d2836e Bug 1193414 - Telemetry for SharedWorker spawning. r=bkelly 2015-08-12 06:00:00 -04:00
Aryeh Gregor
5aeef0231d Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03:00
Seth Fowler
3c08b48c3a Bug 1193125 - Avoid corrupting image data in test_fetch_event.html. r=bkelly 2015-08-11 23:50:28 -07:00
Kyle Huey
76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Ben Kelly
5c5cefb2b2 Bug 1192986 Also mark Cache/CacheStorage as release interfaces on workers. r=ehsan a=bustage 2015-08-10 19:49:22 -07:00
Andrea Marchesini
f7220514cc Bug 1186307 - part 2 - Compilation failures fixed, CLOSED TREE 2015-08-10 17:28:43 +01:00
Andrea Marchesini
b4c30ecaf9 Bug 1186307 - part 1 - Unify the StructuredCloneCallbacks in WorkerPrivate.cpp, r=smaug 2015-08-10 16:33:23 +01:00
Ben Kelly
c7e4c1b91c Bug 983301 Add a test for FetchEvent.respondWith(5). r=bz 2015-08-06 18:12:14 -07:00
Nikhil Marathe
970731b146 Bug 1153499 - Enable push and sw prefs. r=dougt,ehsan
--HG--
extra : commitid : GQaiqrErWLz
extra : rebase_source : 3f01566803616b221b883b51ab079d8868e8e502
extra : source : 06a05093fc417449b9458fa88105e863acddef8d
2015-07-15 13:12:44 -07:00
Nikhil Marathe
25e263af21 Bug 1144660 - client.focus() adds window interaction checks and directly uses DOMServiceWorkerFocusClient to focus window. r=ehsan,dao
client.focus() now directly uses the DOMServiceWorkerFocusClient event. The
platform popup checking is not available on service workers. Instead each
worker maintains a counter of if it is allowed to interact with windows. This
counter is currently only incremented by the notificationclick event and
dropped after the event has been dispatched.

Since acquiring a client is an async operation most service workers will
perform in notificationclick, an additional extension is granted after the event
during which the service worker may focus a client. This extension is only granted
if the script invokes NotificationEvent.waitUntil() at which point the timer begins.
The extension is terminated when the Promise passed to waitUntil() is fulfilled, or
the timer expires, whichever comes first.

--HG--
extra : commitid : 5wavKTRZWcy
extra : rebase_source : fc8ab4ef6c9bf384b5525b0bc979b3cedc4e1d6c
2015-07-23 08:30:27 -07:00
Nikhil Marathe
744a8d6f14 Bug 1144660 - Make KeepAliveHandler threadsafe refcounted. r=ehsan
This works because KeepAliveHandler only holds nsMainThreadPtrHolder<> which is
itself thread safe.  It has assertions that the PromiseNativeHandler overrides
are only called on the worker and these assertions are satisfied.

--HG--
extra : commitid : Kqgfb87dkFH
extra : rebase_source : 56371d2993c681d99814535a4b5289330763f9c3
2015-08-05 20:58:10 -07:00
Carsten "Tomcat" Book
2df123b59f Backed out 1 changesets (bug 1153499) for test failures in browser_force_refresh.js
Backed out changeset 252814d5e628 (bug 1153499)
2015-08-06 09:47:38 +02:00
Nikhil Marathe
ea58277c0d Bug 1153499 - Enable push and sw prefs. r=dougt,ehsan
--HG--
extra : commitid : GLh29700Ofi
extra : rebase_source : 850c4534d62d9db98b890a5239c8f5c647baa8ef
extra : source : 06a05093fc417449b9458fa88105e863acddef8d
2015-07-15 13:12:44 -07:00
Wes Kocher
5e90ccec17 Backed out 3 changesets (bug 1191495, bug 1153499, bug 1144660) for mochitest-push crashes
Backed out changeset 8917e7323399 (bug 1191495)
Backed out changeset 13ed6f60d3f9 (bug 1144660)
Backed out changeset 95bd6642e4b1 (bug 1153499)
2015-08-05 15:18:05 -07:00
Nikhil Marathe
0d07229d06 Bug 1190703 - Relax scope resolution assertion in ServiceWorkerContainer::Register. r=bkelly
--HG--
extra : commitid : 2VyBa3KOyIV
extra : rebase_source : 81940c62d45ce34df1ce60f33ac90f762acee937
extra : amend_source : d0c955ca481b3a473d698176fea9aed407443ff4
2015-08-05 14:33:50 -07:00
Nikhil Marathe
9c77fa0bcd Bug 1144660 - client.focus() adds window interaction checks and directly uses DOMServiceWorkerFocusClient to focus window. r=ehsan,dao
client.focus() now directly uses the DOMServiceWorkerFocusClient event. The
platform popup checking is not available on service workers. Instead each
worker maintains a counter of if it is allowed to interact with windows. This
counter is currently only incremented by the notificationclick event and
dropped after the event has been dispatched.

Since acquiring a client is an async operation most service workers will
perform in notificationclick, an additional extension is granted after the event
during which the service worker may focus a client. This extension is only granted
if the script invokes NotificationEvent.waitUntil() at which point the timer begins.
The extension is terminated when the Promise passed to waitUntil() is fulfilled, or
the timer expires, whichever comes first.

--HG--
extra : commitid : 5DUAOg4j41K
extra : rebase_source : 775d36e41c3d3b62e5189b032220fa2469ac237d
extra : source : 8300859f8e9751ca663f96fae3375dfda8b2ad13
2015-07-23 08:30:27 -07:00
Nikhil Marathe
4d3d992a72 Bug 1153499 - Enable push and sw prefs. r=dougt,ehsan
--HG--
extra : commitid : JbPfHDqXUbo
extra : rebase_source : c1114f39f003e9109da73ab49e30b73826ef8f04
extra : source : 06a05093fc417449b9458fa88105e863acddef8d
2015-07-15 13:12:44 -07:00
Nikhil Marathe
7fe3f37d58 Bug 1190478 - Hide PushEvent.data until we ship message encryption. r=mt,jst
--HG--
extra : commitid : 6i4eexsw50U
extra : rebase_source : 9147a2f5e3996d104ff40e32da3e82ca1cc3917d
2015-08-03 11:04:41 -07:00
Fernando Jimenez
5d630742c6 Bug 1180148 - Clear service workers registered for a site when clearing the cookies and stored data is not working in b2g. r=baku 2015-08-03 22:51:07 +02:00
Nikhil Marathe
839a3bc3fb Bug 1183954 - Fix Notification.data structured cloning on workers. r=robertbindar,mccr8
Rather than store a non-thread-safe refcounted nsIStructuredCloneContainer, store the base64 representation.
Caches a jsval the first time an attempt to access data is made from content script.

--HG--
extra : commitid : Ijd82LTJaYo
extra : rebase_source : f82e837842037ea02efae3a0fc9b2b35c2a0d7d0
2015-07-30 12:44:14 -07:00