Commit Graph

439 Commits

Author SHA1 Message Date
Nicholas Nethercote
06aaac230d Bug 1186810 (part 5) - Replace nsBaseHashtable::EnumerateRead() calls in dom/workers/ with iterators. r=nsm.
--HG--
extra : rebase_source : f4a67d4bca37fbec566a3b110a9f7002df0af7f6
2015-10-25 21:35:44 -07:00
Nicholas Nethercote
5068308113 Bug 1186810 (part 4) - Replace nsBaseHashtable::EnumerateRead() calls in dom/workers/ with iterators. r=nsm.
--HG--
extra : rebase_source : 091b13f8f15a50918c2cf14bf4e3d8cbb4159aec
2015-10-25 21:35:30 -07:00
Nicholas Nethercote
5b93c35c8a Bug 1186810 (part 3) - Replace nsBaseHashtable::EnumerateRead() calls in dom/workers/ with iterators. r=nsm.
--HG--
extra : rebase_source : b30e110d8fe10dcbfef51278c1d2178acd88d004
2015-10-25 21:35:18 -07:00
Nicholas Nethercote
ef9fab3e31 Bug 1186810 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in dom/workers/ with iterators. r=nsm.
--HG--
extra : rebase_source : e50818bf8d9906634d8dff819c8994d9651b93e1
2015-10-25 21:09:05 -07:00
Nicholas Nethercote
0af735c7d5 Bug 1186810 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in dom/workers/ with iterators. r=nsm.
--HG--
extra : rebase_source : ecb25ba6577e77b38894b117893545640de013e2
2015-10-25 21:08:54 -07: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
dimi
0a7f5412e3 Bug 1207727 - Rework updating service workers according to the latest spec. r=bkelly 2015-10-26 10:59:48 +08: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
Jonas Sicking
7bf7cbbd1a Bug 1215746: Remove RequestMode::Cors_with_forced_preflight. r=bkelly 2015-10-19 18:24:36 -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
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
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
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
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
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
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
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
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
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
Ben Kelly
061dd411a3 Bug 1203680 P5 Make ServiceWorkerManager ensure channel upload stream is cloneable. r=nsm 2015-09-15 10:15:45 -07: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
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
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
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
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
Michael Layzell
cd6e65d4d5 Bug 1147821 - Update IndexedDB to use common StorageAllowedForWindow logic, r=khuey 2015-08-28 10:10:30 -04: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
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
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
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
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
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
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
d6eb43737c Bug 1193133 - Drop the document and window references from ServiceWorker. r=bkelly 2015-08-13 13:35:10 -07: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
Aryeh Gregor
5aeef0231d Bug 874842 - Return Event instead of nsIDOMEvent 2015-08-12 14:39:31 +03: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
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
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
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
Eitan Isaacson
3055640112 Bug 1184626 - Add a per-process push message listener. r=smaug
--HG--
rename : dom/push/PushServiceChildPreload.js => dom/push/PushServiceChildPreload.jsm
extra : commitid : JVUONa2Klhc
extra : transplant_source : %8D%A86%94%B2%D7%3F%99%D6%C0%BE/%D8%8A%60%95%EE4%CCt
2015-07-17 14:54:38 -07:00
Kyle Huey
74f03750da Bug 1182316: Part 3 - Add assertions to most other WebIDL entry points, clean up nsIDOMJSWindow cruft. r=peterv 2015-07-16 22:10:35 -07:00
Ben Kelly
55e3066722 Bug 1181887 Fall back to network if ServiceWorker script fails to load. r=ehsan r=khuey 2015-07-15 12:21:40 -07:00
Nikhil Marathe
16a5e3f9b8 Bug 1114554 - Patch 8 - Support waitUntil() on notificationclick event. r=baku
This was originally a part of Bug 1160527, separated due to changes in order of landing the patches.

--HG--
extra : rebase_source : d997a510f7a93506e8804a1a84671e58684c60f5
2015-06-25 18:50:26 -07:00
Nikhil Marathe
0dcce8d9fe Bug 1114554 - Patch 4 - ServiceWorkerRegistration.getNotifications() on main thread. r=wchen
--HG--
extra : rebase_source : 094fa1eca4e3a9e303202ecaad4edf6cd816c065
2015-06-25 18:50:25 -07:00
Nikhil Marathe
f35ee7d850 Bug 1114554 - Patch 3 - Fire notificationclick event on ServiceWorkerGlobalScope. r=wchen,baku
Bug 1114554 - Patch 3.1 - ServiceWorker principal fixes. r=baku

Bug 1162088 introduced origin attributes that ServiceWorkerManager callers have to use. This patch updates notificationclick events to work.

Folded:
Hide NotificationEvent behind pref

--HG--
extra : rebase_source : e892411834525b4c9b31d96d56ddf42634414040
2015-06-25 18:50:25 -07:00
Ehsan Akhgari
a849803571 Bug 1183141 - Use nsTHashtable::Iterator in ServiceWorkerManager::ClaimClients; r=catalinb 2015-07-13 22:42:01 -04:00
Ryan VanderMeulen
0011e3d331 Backed out changeset 57167b45c9d3 (bug 1183141) for wpt failures.
CLOSED TREE
2015-07-13 21:07:29 -04:00
Ehsan Akhgari
1ea4a2fdd5 Bug 1183141 - Use nsTHashtable::Iterator in ServiceWorkerManager::ClaimClients; r=catalinb 2015-07-13 19:28:43 -04:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell
562c0a00bc Bug 1181321 - Eliminate duplicate mRefCnt members in PromiseNativeHandler subclasses. r=baku
--HG--
extra : rebase_source : 64348ca27d2f70dc116856dd4f9271e1fb63a467
2015-07-09 08:56:00 +02:00
Ben Kelly
03162f3aca Bug 1181871 P2 Fix ServiceWorkerManager usage of stack-based ErrorResult. r=ehsan 2015-07-10 13:56:06 -07:00
Carsten "Tomcat" Book
7066396ea2 Backed out changeset 2db7f8ad8c8f (bug 1178233) on request by jaoo
--HG--
extra : rebase_source : 42d27ad778b8bf93773c8f4c9790b46982fda362
extra : histedit_source : bd90cc84a7b25d1d9cbd1a617b1335dd59341748
2015-07-09 10:53:26 +02:00
Jose Antonio Olivera Ortega
4351767879 Bug 1178233 - [non-e10s] The update process doesn't work within about:serviceworkers in non-e10s mode. r=baku 2015-07-09 09:25:55 +02:00
Emanuel Hoogeveen
7d1e52f2ff Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Juan Gomez
258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Hiroyuki Ikezoe
47d5b2db66 Bug 1179982 - Fix all compile errors in dom/workers on non-unified build. r=mrbkap 2015-07-02 14:54:00 +02:00
Ehsan Akhgari
8dc57f5800 Bug 1179567 - Make ServiceWorker keep its document and window alive; r=baku
Without this, ServiceWorker::PostMessage won't work when the window has
been cleaned up, since at that time the event targets are disconnected
from their owners and GetParentObject() will return null.
2015-07-02 09:48:27 -04:00
Ehsan Akhgari
a7e0f3e102 Bug 1148935 - Correctly reflect worker and sharedworker RequestContext values; r=smaug 2015-06-30 18:52:42 -04:00
Ryan VanderMeulen
c4367148d1 Backed out changeset 07bf31cca660 (bug 1148935) for Werror bustage.
CLOSED TREE
2015-06-30 15:53:43 -04:00
Ehsan Akhgari
d560d3dcf3 Bug 1148935 - Correctly reflect worker and sharedworker RequestContext values; r=smaug 2015-06-30 15:30:08 -04:00
Andrea Marchesini
43fb37cc29 Bug 1177621 - SharedWorkers should not be shared between a private and a non-private documents, r=nsm 2015-06-26 11:18:18 -07:00
Ryan VanderMeulen
84d140a54b Backed out 11 changesets (bug 916893, bug 1114554) for various mochitest and Gij failures.
Backed out changeset 247ca4bf258e (bug 1114554)
Backed out changeset 5578d5c280a6 (bug 1114554)
Backed out changeset 404830c1ecf7 (bug 1114554)
Backed out changeset 15bdf9c78e6e (bug 1114554)
Backed out changeset f92abe5ec784 (bug 1114554)
Backed out changeset 75324b6862a8 (bug 1114554)
Backed out changeset ce8a768782f2 (bug 1114554)
Backed out changeset 0d860fd12534 (bug 1114554)
Backed out changeset 7dc2448065a9 (bug 916893)
Backed out changeset c3b07f0d1a60 (bug 916893)
Backed out changeset 61c3f24cc908 (bug 916893)

CLOSED TREE
2015-06-25 19:52:40 -04:00
Ryan VanderMeulen
5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Nikhil Marathe
8f7048a174 Bug 1114554 - Patch 8 - Support waitUntil() on notificationclick event. r=baku
This was originally a part of Bug 1160527, separated due to changes in order of landing the patches.

--HG--
extra : rebase_source : 7095a8aed48684f4c10d2d0927a38bafe851f422
2015-06-24 09:34:11 -07:00
Nikhil Marathe
54e0ea7180 Bug 1114554 - Patch 4 - ServiceWorkerRegistration.getNotifications() on main thread. r=wchen
--HG--
extra : rebase_source : 7963829964347156d091c2c8f492c546a9e5fdc0
extra : amend_source : a1bcbf20f5e4ab65b4214bc97d64deba9732b952
2015-04-27 14:18:54 -07:00
Nikhil Marathe
1abb9e59d8 Bug 1114554 - Patch 3 - Fire notificationclick event on ServiceWorkerGlobalScope. r=wchen,baku
Bug 1114554 - Patch 3.1 - ServiceWorker principal fixes. r=baku

Bug 1162088 introduced origin attributes that ServiceWorkerManager callers have to use. This patch updates notificationclick events to work.

Folded:
Hide NotificationEvent behind pref

--HG--
extra : rebase_source : b536cc6a6e0ba212f225a3638cf4140635628047
2015-06-25 15:01:01 -07:00
Juan Gomez
702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Nikhil Marathe
313557b8e3 Bug 1169044 - Patch 4 - Set referrer on intercepted request. r=jdm
--HG--
extra : rebase_source : eb69cd43d33c1f84d6fb4ea5080db0a6e240570a
2015-06-04 15:50:03 -07:00
Nikhil Marathe
b8eea4d16b Bug 1166350 - Push fixes for principals. r=kitcambridge,bholley
Fix xpcshell tests.
Add support for webapps-clear-data.
Trash old regs on idb version upgrade.
Use principal for permission check.
use principal in PushSubscription.

--HG--
extra : source : d7554019b424327a3271e2c0debda995fff36cb5
extra : intermediate-source : be40dea6534771bdeedc9f7c6ccd8bbddb6e41c2
2015-06-24 13:34:54 -07:00
Ryan VanderMeulen
c01c5195c9 Backed out changeset 98c7277a8fb5 (bug 1166350) for xpcshell failures. 2015-06-24 16:10:45 -04:00
Nikhil Marathe
bd635e2c8a Bug 1166350 - Push fixes for principals. r=kitcambridge,bholley
Fix xpcshell tests.
Add support for webapps-clear-data.
Trash old regs on idb version upgrade.
Use principal for permission check.
use principal in PushSubscription.

--HG--
extra : rebase_source : 3b8cb541512d3fb9a253773c2fd5227c980efdd2
extra : source : d7554019b424327a3271e2c0debda995fff36cb5
2015-06-02 15:56:33 -07:00
Nikhil Marathe
6534f790ec Bug 1160527 - Patch 1 - Support PushEvent.waitUntil(). r=baku.
--HG--
extra : rebase_source : 3cafe72c66d2e04ef939fa092ae55e6b87c0f626
extra : source : a3ca94614c928cc640d41087cffb6c123ed382d7
2015-06-02 14:52:49 -07:00
Ehsan Akhgari
60626aff92 Bug 1175480 - Expose the external content policy type from the load info objects; r=smaug
Consumers of this type need to deal with the external content policy
types.  One example is HttpObserverManager.runChannelListener in
WebRequest.jsm.
2015-06-24 08:52:45 -07:00
Josh Matthews
e78831b550 Bug 1137683 - Use a loadgroup derived from the document's when updating a ServiceWorker; r=bkelly 2015-06-23 10:50:04 -07:00
Andrea Marchesini
138e30b4a8 Bug 1174381 - ServiceWorkerManager::TeardownRunnable should be called when xpcom-shutdown notification is received, r=nsm 2015-06-23 05:56:29 -07:00
Ryan VanderMeulen
926e7b839f Backed out changeset b7653e3d5f91 (bug 1174381) for widespread assertion failures. 2015-06-21 07:47:02 -04:00
Andrea Marchesini
4546e525be Bug 1167296 - patch 2 - ServiceWorkerManager::Remove should use PBackground, r=nsm 2015-06-21 12:19:07 +01:00
Andrea Marchesini
0bc6c733fd Bug 1167296 - patch 1 - ServiceWorkerManager::RemoveAll should use PBackground, r=nsm 2015-06-21 12:17:58 +01:00
Andrea Marchesini
c7076248d9 Bug 1174381 - ServiceWorkerManager::TeardownRunnable should be called when xpcom-shutdown notification is received, r=nsm 2015-06-21 10:21:28 +01:00
Carsten "Tomcat" Book
dc3312548b Backed out changeset b2c472fe14ca (bug 1175480) for crashes in serviceworkers/test_request_context.htm 2015-06-18 09:54:44 +02:00
Carsten "Tomcat" Book
320d038d99 Backed out changeset 7b09594541f3 (bug 1148935) 2015-06-18 09:48:01 +02:00
Ehsan Akhgari
47e2d52863 Bug 1148935 - Correctly reflect worker and sharedworker RequestContext values; r=smaug 2015-06-17 17:48:45 -04:00
Ryan VanderMeulen
88a04ff445 Backed out changeset 439e1f841ea2 (bug 1148935) for Werror bustage.
CLOSED TREE
2015-06-17 15:48:16 -04:00
Ehsan Akhgari
f6c4133715 Bug 1148935 - Correctly reflect worker and sharedworker RequestContext values; r=smaug 2015-06-17 15:09:07 -04:00
Ehsan Akhgari
cee6f01c68 Bug 1175480 - Expose the external content policy type from the load info objects; r=smaug
Consumers of this type need to deal with the external content policy
types.  One example is HttpObserverManager.runChannelListener in
WebRequest.jsm.
2015-06-17 15:09:06 -04:00
Jose Antonio Olivera Ortega
8e93c3cd23 Bug 1160458 - Part 1: Use the CSP of the principal passed to CreateServiceWorker. r=nsm
--HG--
extra : transplant_source : %5D%12%AE%F1%22%FAx%02g%D1C%3E%F7h%DB%AF%5C%A7PY
2015-06-16 09:20:21 +02:00
Ehsan Akhgari
010a84f058 Bug 1172948 - Part 2: Consider all non-chrome parent documents when checking the authenticity of an origin; r=nsm 2015-06-12 09:45:48 -04:00
Ehsan Akhgari
8678e4d7fd Bug 1172948 - Part 1: Refactor the logic for checking for authenticated origins into a helper function; r=nsm 2015-06-12 09:45:46 -04:00
Nikhil Marathe
83d79304bb Bug 1170822 - Fix controlled documents comparison. r=catalinb
--HG--
extra : rebase_source : c49fed55ea782a7ef34e867a9b21b1dc66a7c088
2015-06-02 14:53:09 -07:00
Fernando Jimenez
86b73d268c Bug 1169249 - Unregister service worker registration when uninstalling a service-worker-enabled application. r=baku 2015-06-11 19:42:38 +02:00
Eric Rahm
cfbf5aa4f8 Bug 1171555 - Remove overly verbose ServiceWorker warnings. r=bkelly 2015-06-11 09:47:46 -07:00
Fernando Jimenez
dbb95a17ef Bug 1137245 - ServiceWorkerManager should set WorkerPrivate::LoadInfo::mIndexedDBAllowed correctly. r=bent, bkelly 2015-06-11 15:32:54 +02:00
Ben Kelly
42f5e55e0e Bug 1173361 Make ServiceWorkerRegisterJob::Start() call Done() async. r=nsm 2015-06-10 13:39:42 -07:00
Ehsan Akhgari
ea81410c78 Bug 1173240 - Use the document URI for performing the service worker registration secure origin check; r=baku 2015-06-10 10:33:36 -04:00
Andrea Marchesini
dcdcd94a06 Bug 1155153 - about:serviceworkers should work in e10s mode, r=nsm, r=bholley 2015-06-04 19:51:57 +01:00
Nikhil Marathe
338560dbe9 Bug 1172717 - Fail on UNKNOWN_APP_ID instead of crashing. r=bholley a=RyanVM
--HG--
extra : rebase_source : 971c575911a800d97c741a65efcf0689b454fee3
extra : amend_source : abdf62fe7b775cf3305a4e8a0616c99096813cec
2015-06-08 16:18:09 -07:00
Jose Antonio Olivera Ortega
88a9211951 Bug 1115820 - Add telemetry to ServiceWorkers. r=nsm, r=vladan
--HG--
extra : rebase_source : 69547573525bcea989d24e0a0293f6df9e7f90e1
2015-06-05 08:11:18 +02:00
Ehsan Akhgari
a402da64d1 Bug 1171486 - Part 2: Make it OK to call ServiceWorkerManager::GetInstance() during its Init() function; r=baku 2015-06-05 08:52:19 -04:00
Carsten "Tomcat" Book
e7e949f08a Backed out changeset bc305c9b5d05 (bug 1155153) for b2g xpshell test failure on a CLOSED TREE 2015-06-05 13:07:51 +02:00
Andrea Marchesini
42cd5b397c Bug 1155153 - about:serviceworkers should work in e10s mode, r=nsm, r=bholley 2015-06-04 19:51:57 +01:00
Ehsan Akhgari
cbf85aceea Bug 1171486 - Avoid recursively obtaining the service worker manager service; r=nsm 2015-06-04 16:27:48 -04:00
Bobby Holley
7df20a2925 Bug 1171175 - Improve BasePrincipal::IsCodebasePrincipal. r=baku 2015-06-04 10:01:40 -07:00
Andrea Marchesini
80f57ca876 Bug 1131352 - Part 3: ServiceWorkerManager::SetSkipWaitingFlag() updated CLOSED TREE 2015-06-03 15:20:52 +01:00
Jose Antonio Olivera Ortega
2d3a0be044 Bug 1131352 - Part 2: Add ServiceWorkerGlobalScope skipWaiting(). r=nsm, r=baku 2015-06-02 07:12:00 -04:00
Andrea Marchesini
a71e717b67 Bug 1162088 - patch 1 - ServiceWorkerManager should use OriginAttributes from the principal as scopeKey, r=nsm, r=bholley 2015-06-03 09:43:43 +01:00
Ehsan Akhgari
0cd59018b9 Bug 1170550 - Don't crash when registering a service worker which has a strict mode error; r=baku 2015-06-02 18:20:52 -04:00
Jose Antonio Olivera Ortega
c5913f35b9 Bug 1169210 - Can't call content service worker from chrome. r=nsm
--HG--
extra : rebase_source : a49c90113ea72dad97d70906479870c5b50f29ad
2015-05-29 18:17:33 +02:00
Fernando Jimenez
95803111ef Bug 1161684 - Allow JAR channels to be intercepted by service workers. r=jdm 2015-05-22 09:32:25 +02:00
Sebastian Hengst
89d9f2f631 Backout 068cc6419d1e (Bug 1161684) for M4 perma-failures on opt. r=backout 2015-05-22 10:48:03 +02:00
Fernando Jimenez
6608088159 Bug 1161684 - Allow JAR channels to be intercepted by service workers. r=jdm 2015-05-22 09:32:25 +02:00
Ryan VanderMeulen
e1ee0d7597 Backed out changeset f0af05d88416 (bug 1162088) for various web-platform-test failures.
CLOSED TREE
2015-05-19 15:20:15 -04:00
Andrea Marchesini
1d31da42fd Bug 1162088 - ServiceWorkerManager should use the principal+scope for the initialization of ServiceWorkers, r=nsm,ehsan 2015-05-19 17:53:36 +01:00
Terrence Cole
161a4c26ba Bug 1164602 - Replace js::NullPtr and JS::NullPtr with nullptr_t; r=sfink 2015-05-13 14:07:34 -07:00
Catalin Badea
8b1fbc7805 Bug 1130684 - Implement Service Worker clients.claim. r=nsm,ehsan
--HG--
extra : rebase_source : ea1da8f6dfd8d31936c0ae495ec262581c9e5775
2015-05-14 12:41:42 -07:00
Ehsan Akhgari
ac2874c72f Bug 1130101 - Part 2: Honor the Service-Worker-Allowed header when prefix matching the service worker scope; r=nsm 2015-05-07 21:06:34 -04:00
Nikhil Marathe
1bcf68b61f Bug 1150959 - Log rejected Promise error message to browser console
--HG--
extra : rebase_source : e3fdd530c32c042791e959f896ef4ae06263f1f0
2015-04-08 16:04:12 -07:00
Nikhil Marathe
4c2d6784e1 Bug 1080109 - Clear ServiceWorkers when clearing history or forgetting about site. r=baku,ehsan
--HG--
extra : rebase_source : 41417b60ed6603d613b65cd7e96a5ba8121b05e5
2015-03-05 17:37:49 -08:00
Nikhil Marathe
cbd6b8b352 Bug 1154494 - Hit network only once. r=baku,bkelly
--HG--
extra : rebase_source : d2720c0bbef92595228658d92db3bbaef051cced
2015-04-13 21:05:28 -07:00
Ehsan Akhgari
c18dfa5852 Bug 1134325 - Part 2: Correctly reflect the Request's body to the service worker's fetch event; r=jdm 2015-05-05 13:20:54 -04:00
Andrew McCreight
9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Andrea Marchesini
7f54aa583d Bug 1157627 - about:serviceworkers should show new registered ServiceWorkers. r=nsm 2015-04-30 15:32:47 +01:00
Ben Kelly
f15449e4a2 Bug 1134841 Hold ServiceWorker alive during install event's waitUntil(). r=bz 2015-05-01 08:14:42 -07:00
Boris Zbarsky
1540774b0c Bug 1157898 part 1. Make code of the form "return rv.ErrorCode();" where rv is an ErrorResult use StealNSResult instead. r=peterv
This patch was generated with the following command:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 's/return ([a-zA-Z0-9]+)\.ErrorCode\(\);/return \1.StealNSResult();/'
2015-04-27 09:18:51 -04:00
Dragana Damjanovic
984272cb6d Bug 1156397 - some fix for webpush PushServer. r=dougt r=nsm
--HG--
extra : rebase_source : 06425ea3c83db38da11e345ee998a470f9e26570
2015-04-24 14:55:00 +02:00
L. David Baron
b263b5134d Back out bug 1154494 (changeset 94c2f1d254e7 and changeset d1269f811e05) for causing intermittent orange in various service worker tests. 2015-04-25 15:07:54 -07:00
Nikhil Marathe
903081acfe Bug 1154494 - Hit network only once. r=baku,bkelly
--HG--
extra : rebase_source : b7683b543875fae592dc21e292d8807d3e90af45
2015-04-13 21:05:28 -07:00
Ben Kelly
ab4d405a60 Bug 1158218 Follow-up to fix mis-indentation. DONTBUILD, whitespace-only r=me 2015-04-24 11:55:06 -07:00
Ben Kelly
bd66f1624a Bug 1158218 Improve ServiceWorkerManager NS_WARNINGS on failure. r=nsm 2015-04-24 11:42:13 -07:00
Ehsan Akhgari
45059ab04f Back out bug 1154494 for test bustage on a CLOSED TREE 2015-04-23 16:59:24 -04:00
Nikhil Marathe
c7df8d193b Bug 1154494 - Hit network only once. r=baku,bkelly 2015-04-23 16:00:58 -04:00
Nikhil Marathe
d7b71e8fbf Bug 1131327 - Patch 6 - SWM holds ServiceWorkerRegistrationListener for updatefound and invalidation notifications. r=baku
Splits up the listener interface to which SWM can hold rawptrs so that registration objects living on the worker thread can use awkward proxies to listen to these events.

--HG--
extra : rebase_source : 7b9753742b3dd6e416057fdee528b0d2067c55a9
2015-04-08 13:13:32 -07:00
Nikhil Marathe
3f0efb4e4d Bug 1131327 - Patch 1 - Introduce ServiceWorkerRegistration{Base,MainThread,WorkerThread} r=baku
--HG--
extra : rebase_source : 352f05447f45a9dfa651bf683d22659b83508814
2015-04-03 15:18:55 -07:00
Nikhil Marathe
e8ed488816 Bug 1131350 - Move update() to ServiceWorkerRegistration. r=baku
--HG--
extra : rebase_source : 0483ec35b9b53c4970afaf76ff3b8a6f92120e34
2015-03-19 18:09:10 -07:00
Rahul
cc5d6147ae Bug 1152473 - Remove InstallEvent. r=nsm,ehsan
--HG--
extra : rebase_source : f2c7f7069f4b0606d3185d5be9255d1ae20fea1e
2015-04-20 18:47:13 -07:00
Denis Volk
32e981896d Bug 1095098 - move do_QueryObject templates into their own header; r=froydnj 2015-04-15 12:47:03 -04:00
Ehsan Akhgari
44e6522def Bug 1112469 - Part 2: Update the service workers in the parent and all child processes every day; r=nsm 2015-04-17 14:01:21 -04:00
Andrea Marchesini
3faaae83fb Bug 1154721 - Add an "Unregister" button to about:serviceworkers, r=ehsan 2015-04-15 18:11:17 +01:00
Doug Turner
9c9d8e38df Bug 1038811 - Push Notifications - ServiceWorker changes, push event implementation. r=nsm 2015-04-10 20:19:28 -07:00
Andrea Marchesini
81daef00e3 Bug 1133601 - Implement about:serviceworkers, r=ehsan 2015-04-10 09:50:06 +01:00
Nikhil Marathe
2c8d274d0e Bug 931249 - Patch 16 - Keep ServiceWorker alive during installation steps. r=baku
--HG--
extra : rebase_source : 88d66a3005096765ba9958858fe683874453653a
2015-04-01 16:46:49 -07:00
Nikhil Marathe
cfaf66dfc3 Bug 931249 - Patch 11 - Remove unused cacheName. r=bkelly
--HG--
extra : rebase_source : 2ea9f85f5c818b19ba8920bd3668d4c573869863
2015-03-19 17:25:28 -07:00
Nikhil Marathe
3b27da6f52 Bug 931249 - Patch 9 - Use ServiceWorker cache name as part of it's unique name. r=khuey
When a SW script is updated (it gets a new cache), if there was already an existing running worker with the same scope and script, that would be reused and the update wouldn't happen.

--HG--
extra : rebase_source : baeb7d62845aee3ce7d1b1622e883528283500dc
2015-03-19 16:40:52 -07:00
Nikhil Marathe
17ef920c79 Bug 931249 - Patch 7 - Call Done() after Succeed() when cache and network match. r=bkelly
--HG--
extra : rebase_source : 4aef8d6428b6fcd05e7d400cbca4ff075cd49a69
2015-03-19 15:03:49 -07:00
Nikhil Marathe
1084347046 Bug 931249 - patch 4 - comparison. r=nsm
--HG--
extra : rebase_source : 863e9a46d04513ae8770da2dc9c406457fbda849
2015-03-18 09:52:54 -07:00
Nikhil Marathe
f9c8e3cf34 Bug 931249 - patch 2.2 - purge old active worker cache when activating new worker. r=baku
--HG--
extra : rebase_source : 68af9c1c291181abad3d4e70826c5077bab23010
2015-03-18 14:05:00 -07:00
Nikhil Marathe
14dbedd3aa Bug 931249 - patch 2.1 - reuse cache name between updating and installing worker. r=baku
--HG--
extra : rebase_source : 8484cf4e7e91dc5bd446bb7922ff112c137f5761
2015-03-18 14:02:51 -07:00
Nikhil Marathe
42de02a529 Bug 931249 - patch 2 - cachename integration. r=nsm
--HG--
extra : rebase_source : 8a5bd6a3ec53ccd83c08e58f7a74f6ae1f0edea7
2015-03-18 09:46:38 -07:00
Nikhil Marathe
238374c507 Bug 931249 - patch 1 - Scriptloader use cache if needed. r=khuey
--HG--
extra : rebase_source : c81b13a05ec04a68c3acd25807fcf997bd9db81e
2015-03-19 11:41:42 -07:00
Ehsan Akhgari
72ef6b42e1 Bug 1148854 - Part 1: Relax the assertion in ServiceWorkerManager::DispatchFetchEvent; r=nsm,jdm 2015-04-02 17:58:22 -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
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
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
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
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
Josh Matthews
41763998ae Bug 1134330 - Mark fetch events as reloads appropriately. r=smaug 2015-03-23 13:36:44 -04: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
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
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
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
Catalin Badea
c230b69ed6 Bug 1058311 - Update client interface. Implement matchAll WindowClient. r=baku 2015-03-06 15:04:49 +02:00
Nikhil Marathe
cc619e4f2b Bug 1139990 - Remove No activatingWorker warning. r=ehsan
--HG--
extra : rebase_source : fd5876750d52dfa86581cc015b897b29f62338a5
2015-03-05 09:39:58 -08:00
Nikhil Marathe
e1fd2f9171 Bug 1137419 - Use correct principal for update. r=baku
--HG--
extra : rebase_source : 45a7a638507f397af741c973dc37f9a201925a17
2015-02-23 10:34:40 -08:00
Nikhil Marathe
a817a419ab Bug 1131882 - Associate ServiceWorkers with underlying ServiceWorkerInfo. r=baku
This allows controller to track state too, and provides better encapsulation.
1) Move SW setup to SWM. RuntimeService now only creates the underlying SharedWorker.
2) Require a SWInfo to create a SW. The SW holds a refptr to the info.

--HG--
extra : rebase_source : d9de8a66a45f597d1613890691d1facae51eb64e
2015-02-19 08:40:21 -08:00
Nikhil Marathe
654185b808 Bug 1132141 - Update storage when ServiceWorker registration fails. r=baku
--HG--
extra : rebase_source : 157d80aa45cb76e4ba4a8ea3164a97505ca50d52
2015-02-11 10:51:32 -08:00
Nikhil Marathe
5dfd14e923 Bug 1131874 - ServiceWorker persistence activation fixes. r=baku
--HG--
extra : rebase_source : 2c8dd5e97740cf45c4e08684145d882e9551d3cb
2015-02-10 18:08:58 -08:00
Tim Taubert
2665cbe4f7 Bug 1001691 - WorkerPrivate::LoadInfo -> WorkerLoadInfo r=khuey 2015-02-12 10:50:05 +01:00
Tim Taubert
9dccd5c5ae Backed out changeset 2ea14f386df2 (bug 1001691) 2015-03-03 19:13:23 +01:00
Tim Taubert
661d8bb7bf Bug 1001691 - WorkerPrivate::LoadInfo -> WorkerLoadInfo r=khuey 2015-02-12 10:50:05 +01:00
Josh Matthews
65badaa73f Bug 1137250 - Fix incorrect initialization of Request object. r=bz 2015-02-26 15:40:00 -05:00
Nikhil Marathe
a3a6ac6348 Bug 1137408 - Use inner window to create ServiceWorker for Fetch Event. r=jdm
--HG--
extra : rebase_source : b308210c20b30ef8f2d3220a784c88f4e3a06f45
2015-02-26 15:14:51 -05:00
Ben Kelly
4d074ba44d Bug 1118845 P2 Make SharedWorker override parent LoadGroup with custom proxy callbacks. r=khuey 2015-02-21 10:09:17 -05:00
Daniel Holbert
e6a8734aa7 Bug 1134931: Add some missing MOZ_OVERRIDE annotations in ServiceWorkerManager.cpp, nsFrameMessageManager.cpp, and 2D.h. r=ehsan 2015-02-20 09:25:07 -08:00
Catalin Badea
9804afb257 Bug 1058311 - Remove prefix for SWClients. Rename getServiced to matchAll. Add stub query options for matchAll r=baku
--HG--
rename : dom/webidl/ServiceWorkerClient.webidl => dom/webidl/Client.webidl
rename : dom/webidl/ServiceWorkerClients.webidl => dom/webidl/Clients.webidl
rename : dom/workers/test/serviceworkers/test_get_serviced.html => dom/workers/test/serviceworkers/test_match_all.html
2015-02-20 17:16:17 +02:00
Josh Matthews
86618832b4 Bug 1065216 - Dispatch a fetch event to workers when controlled pages initiate a network load. r=baku,mayhemer,smaug 2015-02-18 20:34:29 -05:00
Ryan VanderMeulen
5abea51e9a Backed out changeset 25f90464e93b (bug 1065216) for Android mochitest failures. 2015-02-18 16:00:33 -05:00
Josh Matthews
cb61a019fc Bug 1065216 - Dispatch a fetch event to workers when controlled pages initiate a network load. r=baku,mayhemer,smaug 2015-02-18 14:10:52 -05:00
Nikhil Marathe
59c94c2ff2 Bug 1130570 - Ensure we have a valid runtime service, and clear updating scopes on early return. r=baku
--HG--
extra : rebase_source : 0274f76d6a89eca902a52fe5dbc7e431f9e9737d
2015-02-11 13:24:57 -08:00
Nikhil Marathe
58fe387602 Bug 1130065 - ServiceWorkerManager capture "atomically" properly.
Folds:
Enable most SW tests
Cannot rely on controllerchange firing in an already controlled window. The AbortError case is no longer relevant due to FIFO ordering
Too bad we have to use timeouts

--HG--
extra : rebase_source : cef7f30bfab1e4079846d2aa4080f534ebaf8a3c
2015-02-10 14:33:23 -08:00
Nikhil Marathe
9199c59594 Bug 1041340 - Implement [[HandleDocumentUnload]]. r=baku
--HG--
extra : rebase_source : 05bee71b7e26a52783462b9803fe161077af9a7b
2014-10-24 15:11:26 -07:00
Andrea Marchesini
7420ed16c7 Bug 1133242 - ServiceWorkerManager must use the correct principal in b2g, r=nsm 2015-02-17 13:36:09 +01:00
Carsten "Tomcat" Book
c17d0e5157 Backed out changeset 4ed31c8b45c6 (bug 1041340) for causing multiple timeouts on different platforms in service worker tests on a CLOSED TREE 2015-02-17 09:35:58 +01:00
Carsten "Tomcat" Book
1ae698f614 Backed out changeset 4d8423d5a83b (bug 1130065) 2015-02-17 09:35:27 +01:00
Carsten "Tomcat" Book
7e2b11aebf Backed out changeset 8e6ce9a41be7 (bug 1130570) 2015-02-17 09:35:25 +01:00