Граф коммитов

175 Коммитов

Автор SHA1 Сообщение Дата
Catalin Badea 3475196327 Bug 1317266 - Transition ServiceWorker instances when the SW changes states instead of just invalidating them. r=bkelly 2016-11-21 02:14:54 +00:00
Ehsan Akhgari 1488007b30 Bug 1318206 - Remove some unused code for clearing app data; r=baku,mcmanus 2016-11-17 08:30:21 -05:00
Andrea Marchesini 137c628055 Bug 1289001 - NeckoParent::GetValidatedAppInfo should consider ServiceWorkers when validating HttpChannel requests, r=bkelly, r=valentin, f=asuth 2016-11-03 08:18:51 +01:00
Sebastian Hengst 5cd97768df Backed out changeset 0473f2d0d024 (bug 1289001) for eslint failures. r=backout on a CLOSED TREE 2016-11-02 23:04:44 +01:00
Andrea Marchesini d20e6fd29f Bug 1289001 - NeckoParent::GetValidatedAppInfo should consider ServiceWorkers when validating HttpChannel requests, r=bkelly, r=valentin, f=asuth 2016-11-02 21:57:45 +01:00
Tom Tung c34ee7095c Bug 1187335 - P1 - Add a way to report error to all clients for ServiceWorker and SharedWorker. r=bkelly. 2016-05-23 14:56:46 +08:00
Ben Kelly 1a8803ebd5 Bug 1170543 P3 Expose ServiceWorker idle thread state to ServiceWorkerManager. r=asuth 2016-07-27 20:36:10 -04:00
Ben Kelly c8cef10a01 Bug 1228277 P2 Make skipWaiting() check the evaluating service worker script. r=asuth 2016-07-27 19:09:15 -04:00
Andrew Sutherland d1659931b7 Bug 1267473 - Report to console if service worker script 404s. r=bkelly
Add an error message of the following form for when a register/update job
fails for network reasons:

Failed to register/update a ServiceWorker for scope
‘http://mochi.test:8888/tests/dom/workers/test/serviceworkers/network_error/’:
Load failed with status 404 for script
‘http://mochi.test:8888/tests/dom/workers/test/serviceworkers/404.js’.

A mochitest is added that verifies this.

To simplify the process of logging error messages, ServiceWorkerManager gains
a new LocalizeAndReportToAllClients method that always provides the SW scope as
the first argument to the localized string since all good error messages should
include it.

Its argument list takes an nsTArray<nsString> in order to reduce the potential
for use-after-free scenarios from the char16_t** signature that unfortunately
has rippled outwards from the nsIStringBundle interface.  This potentially
results in more memory allocation and byte shuffling than is strictly
necessary, but we're also talking about rare error logging where it's
better to optimize for easily adding the messages without needing to get hung
up on the life-cycle of temporaries.

nsTArray gained a std::initializer_list in bug 1228641.  It is explicit, so
inline argument usages may take a form along the lines of:
`nsTArray<nsString> { string1, string2, ... }`

This change did necessitate a change to nsContentUtils to add an nsTArray
variant of FormatLocalizedString since the existing public function was
slightly too clever.  It used a template function to statically acquire the
number of arguments at compile time, which is not compatible with the dynamic
nsTArray usage. Since nsTArray may be useful to other consumers as well, I
placed the conversion logic in nsContentUtils.
2016-07-10 22:22:27 -04:00
Kit Cambridge d9d287a14e Bug 1265841 - Implement the `notificationclose` service worker event. r=wchen,baku
MozReview-Commit-ID: EQfCbQKqn9H

--HG--
extra : rebase_source : 2dad51a3c148db794769fb7c64c28f81ea2ca6ff
extra : histedit_source : 254e2e372ba605f74c1f5106f40b207e492e85e1
2016-04-19 22:04:09 -07:00
Ben Kelly e5a1d1af80 Bug 1266857 Make Clients.claim() use observer document list instead of secondary hashtable. r=bz 2016-04-24 08:11:32 -07:00
Phil Ringnalda 296f3a95c3 Back out 4 changesets (bug 1265771, bug 1266857) for leaks in browser_DownloadPDFSaver.js on Windows
CLOSED TREE

Backed out changeset a0c85ccffafd (bug 1266857)
Backed out changeset 1cf8785bdc0c (bug 1265771)
Backed out changeset e411c3ccd7b6 (bug 1265771)
Backed out changeset a298cd2c9417 (bug 1265771)
2016-04-22 21:27:11 -07:00
Ben Kelly b4090694b7 Bug 1266857 Make Clients.claim() use observer document list instead of secondary hashtable. r=bz 2016-04-22 00:50:13 -07:00
Ben Kelly 6f3adcd11b Bug 1260591 Move ServiceWorkerInfo and ServiceWorkerRegistrationInfo into separate files. r=jdm 2016-04-08 17:28:25 -07:00
Wes Kocher 06cdc2f4b8 Backed out changeset c24f78610523 (bug 1260591) for build bustage on at least Windows CLOSED TREE
MozReview-Commit-ID: AlLfu3CM10S

--HG--
extra : amend_source : ebac1dd7e8731db98da1bf286e7a88bee5c4e171
2016-04-08 16:03:54 -07:00
Ben Kelly 60056e5afe Bug 1260591 Move ServiceWorkerInfo and ServiceWorkerRegistrationInfo into separate files. r=jdm 2016-04-08 15:43:11 -07:00
Ben Kelly 807cba86ca Bug 1256428 P17 Rename service worker job classes to remove "2" suffix. r=jdm 2016-04-06 13:27:23 -07:00
Ben Kelly bd0809f521 Bug 1256428 P12 ServiceWorkerUnregisterJob2 should not use ServiceWorkerManager internals. r=jdm 2016-04-06 13:27:23 -07:00
Ben Kelly 6bdc298a74 Bug 1256428 P10 Remove ServiceWorkerRegistrationInfo::mUpdating flag. r=jdm 2016-04-06 13:27:23 -07:00
Ben Kelly 1bafe887a8 Bug 1256428 P9 Remove now unused code from ServiceWorkerManager.cpp. r=jdm 2016-04-06 13:27:22 -07:00
Ben Kelly 7358d7c977 Bug 1256428 P6 Use ServiceWorkerJobQueue2 and new job classes in ServiceWorkerManager. r=jdm 2016-04-06 13:27:22 -07:00
Ben Kelly 50026652cb Bug 1256428 P5 Add ServiceWorkerUnregisterJob2 class. r=jdm 2016-04-06 13:27:22 -07:00
Ben Kelly 9f390beeff Bug 1256428 P3 Add ServiceWorkerUpdateJob2. r=jdm 2016-04-06 13:27:22 -07:00
Ben Kelly 9aff747125 Bug 1256428 P1 Add ServiceWorkerJob2 base class. r=jdm 2016-04-06 13:27:22 -07:00
Kit Cambridge d55b21e98b Bug 1246341 - Report push event errors and rejections to the Push service. r=baku
MozReview-Commit-ID: D6fRPqojOEh

--HG--
extra : rebase_source : 41c55862cb7393681fdea28e35b689a970a376c3
2016-03-28 11:50:39 -07:00
Ben Kelly 9856db4da2 Bug 1256411 Simplify and cleanup ServiceWorkerInfo. r=ehsan 2016-03-15 07:29:56 -07:00
Ben Kelly 7ebbd928f1 Bug 1253738 P1 Require an explicit principal when looking up a service worker registration. r=baku 2016-03-08 06:55:41 -08:00
Ben Kelly a9358d515b Bug 1252055 P1 Make equivalent ServiceWorker DOM objects strictly equal in js. r=ehsan 2016-03-03 19:37:57 -05:00
dimi f4133f869a Bug 1237992 - service worker activate should be executed after install onstatechange events are fired. r=bkelly 2016-02-25 09:03:28 +08:00
Ben Kelly eee3c799da Bug 1242482 P4 Don't call SendUnregister() a second time when SW registration is finally removed. r=baku
--HG--
extra : rebase_source : 88a0529fab3ab7e14a44573126c067877f5073d2
2016-02-15 13:40:00 +01:00
Ben Kelly c7c4fb325b Bug 1242482 P3 Don't send unregister messages when triggered from a PropagateUnregister(). r=baku
--HG--
extra : rebase_source : bca7c0517ca06a7daf44117148309af64f75f29e
2016-02-20 07:03:00 +01:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Kit Cambridge 9e4ed15128 Bug 1239584, Part 1 - Add `nsIPushNotifier` and `nsIPushMessage` interfaces. r=dragana
--HG--
extra : commitid : HD2fDINypFu
extra : rebase_source : 477ab56822deb5e6423c8f9b36f1a5c119d07951
2016-01-13 22:19:51 -07:00
Kit Cambridge f398300afc Back out out 3 changesets (bug 1239584) for B2G build failures on a CLOSED TREE.
--HG--
extra : commitid : 74RywJW7UVo
extra : amend_source : 2088096e01cb7b6fda50c87f05d427cd79147554
2016-01-22 11:06:14 -08:00
Kit Cambridge ecc52d87d2 Bug 1239584, Part 1 - Add `nsIPushNotifier` and `nsIPushMessage` interfaces. r=dragana
--HG--
extra : commitid : F7MFsrMAXQy
extra : rebase_source : 3333eed45b538bccbdf2761a91fb5fada8fcf922
2016-01-13 22:19:51 -07:00
Yoshi Huang bd65e48e3f Bug 1233644 - use pattern matching when listening clear-origin-data. r=baku 2015-12-18 18:58:41 +08:00
Ehsan Akhgari 40c82fa10c Bug 1236686 - Remove nsIFetchEventDispatcher; r=jdm 2016-01-05 15:04:41 -05:00
Ben Kelly 9af4ff4976 Bug 1231974 P3 Store the principal on the ServiceWorkerJobBase. r=baku 2015-12-18 11:04:39 -05:00
Ben Kelly 6078977989 Bug 1226443 P2 Make service worker fetch and functional events used scheduled timer updates. r=ehsan 2015-12-11 14:53:11 -05:00
Ben Kelly 3a28ef3617 Bug 1226443 P1 Add a timer based mechanism for firing service worker updates. r=ehsan 2015-12-11 14:53:10 -05:00
Ben Kelly a27a88c3ed Bug 1227015 P5 Remove ServiceWorkerRegistrationInfo mScriptSpec. r=ehsan 2015-12-11 14:53:10 -05:00
Ben Kelly 6fa639dd7a Bug 1227015 P1 Create ServiceWorkerScriptJobBase as parent class to register and install jobs. r=ehsan 2015-12-11 14:53:10 -05:00
Phil Ringnalda 9229dc1d27 Back out 13 changesets (bug 1226443, bug 1227015) for a variety of serviceworker web-platform-test failures
CLOSED TREE

Backed out changeset d518261eb3b1 (bug 1226443)
Backed out changeset a7def186c1d3 (bug 1226443)
Backed out changeset e2f21ee1cd4c (bug 1226443)
Backed out changeset 8c4aff8bbfaf (bug 1226443)
Backed out changeset 4c85bf5e9bf5 (bug 1226443)
Backed out changeset 8fbc71a2912a (bug 1227015)
Backed out changeset 00ac71165014 (bug 1227015)
Backed out changeset e261f601b14d (bug 1227015)
Backed out changeset 78896c0bcb95 (bug 1227015)
Backed out changeset 244093d57c03 (bug 1227015)
Backed out changeset 03abf4d48e38 (bug 1227015)
Backed out changeset 2090c1e30933 (bug 1227015)
Backed out changeset 84e011be4e35 (bug 1227015)
2015-12-10 18:49:48 -08:00
Ben Kelly 33b46308aa Bug 1226443 P2 Make service worker fetch and functional events used scheduled timer updates. r=ehsan 2015-12-10 18:08:14 -05:00
Ben Kelly 7c8d5aa8c3 Bug 1226443 P1 Add a timer based mechanism for firing service worker updates. r=ehsan 2015-12-10 18:08:14 -05:00
Ben Kelly 5488438bfc Bug 1227015 P5 Remove ServiceWorkerRegistrationInfo mScriptSpec. r=ehsan 2015-12-10 18:08:13 -05:00
Ben Kelly 5a2acd2b46 Bug 1227015 P1 Create ServiceWorkerScriptJobBase as parent class to register and install jobs. r=ehsan 2015-12-10 18:08:13 -05:00