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

54 Коммитов

Автор SHA1 Сообщение Дата
Yaron Tausky b2f39a053a Bug 1488792: Reject calls to update() while service worker in 'installing' state r=asuth
The service workers spec mandates that calling ServiceWorkerRegistration.update()
on a registration whose newest worker is in the 'installing' state fail immediately.
This commit implements this requirement and tests it.

Differential Revision: https://phabricator.services.mozilla.com/D5241

--HG--
extra : moz-landing-system : lando
2018-10-10 08:20:01 +00:00
Blake Kaplan ca85669dab Bug 1482921 - The ServiceWorkerManager should no longer use these types. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D3220

--HG--
extra : moz-landing-system : lando
2018-08-14 07:59:11 +00:00
Perry Jiang 35942af79c Bug 1479592 - Remove unused PromiseWindowProxy r=mrbkap
Remove unused PromiseWindowProxy code and nsGlobalWindowInner::AddPendingPromise and nsGlobalWindowInner::RemovePendingPromise

Differential Revision: https://phabricator.services.mozilla.com/D2621

--HG--
extra : moz-landing-system : lando
2018-08-02 17:00:35 +00:00
Ben Kelly a99ba38721 Bug 1469048 Disable service worker propagation when e10s pref is enabled. r=mrbkap
--HG--
extra : rebase_source : f7a11d459a7f54ecc8b71746ff2810a7bb276692
2018-07-09 16:02:41 -07:00
Ben Kelly c38d6a18a2 Bug 1471706 P1 Track each registration state change with a version number stored on the descriptor. r=mrbkap 2018-07-02 07:44:19 -07:00
Ben Kelly 241115d614 Bug 1471631 Move ServiceWorkerManager::AddRegistrationEventListener() code to ServiceWorkerRegistrationInfo. r=mrbkap 2018-07-02 07:44:19 -07:00
Ben Kelly 4866ecedf2 Bug 1462772 P2 Add the registration Id to the ServiceWorkerDescriptor. r=mrbkap 2018-07-02 07:44:18 -07:00
Ben Kelly 78b42d6228 Bug 1469873 Make ClientSource::Control() fail if storage access is not available and make claim() respect the result. r=mrbkap 2018-06-28 12:58:23 -07:00
Brindusan Cristian c20abdcc34 Backed out changeset b610acdb4ead (bug 1469873) for mochitest crashes on xul.dll. CLOSED TREE 2018-06-28 20:09:59 +03:00
Ben Kelly a17ff40103 Bug 1469873 Make ClientSource::Control() fail if storage access is not available and make claim() respect the result. r=mrbkap 2018-06-28 06:27:57 -07:00
Ben Kelly 05c034e494 Bug 1468853 Note inherited controller in the parent process when the service worker e10s pref is flipped. r=mrbkap 2018-06-22 07:22:59 -07:00
Andrea Marchesini e39f6cd8a9 Bug 1468592 - use nsIEffectiveTLDService::hasRootDomain instead of custom hasRootDomain implementations, r=valentin 2018-06-14 04:31:14 -07:00
Dorel Luca 535f1df913 Merge mozilla-central to mozilla-inbound 2018-06-04 21:48:29 +03:00
Ben Kelly f5141d8667 Bug 1462069 P1 Make ServiceWorkerManager::MaybeClaimClient() take a ClientInfo instead of nsIDocument. r=baku 2018-06-04 09:10:50 -07:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Gurzau Raul dd2e67b482 Backed out 3 changesets (bug 1462069) for build bustage on /src/dom/clients/manager/ClientManagerService.cpp on a CLOSED TREE
Backed out changeset 999be9379af3 (bug 1462069)
Backed out changeset 457cb3f8a0d9 (bug 1462069)
Backed out changeset ec66aff745a8 (bug 1462069)
2018-06-01 23:57:36 +03:00
Ben Kelly 6d1736c617 Bug 1462069 P1 Make ServiceWorkerManager::MaybeClaimClient() take a ClientInfo instead of nsIDocument. r=baku 2018-06-01 13:39:57 -07:00
Ben Kelly 08be40bcc5 Bug 1465103 Convert service worker and clients release assertions to diagnostic assertions. r=asuth 2018-06-01 13:36:34 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Ben Kelly 8048d5574f Bug 1461181 Don't call ServiceWorkerManager::StartControllingClient() if there is no active worker. r=asuth 2018-05-21 09:13:47 -07:00
Ben Kelly a38e5a95d8 Bug 1462077 P1 Make ServiceWorkerManager::DispatchFetchEvent() use the new client if we create one for an STS upgrade. r=asuth 2018-05-16 14:18:36 -07:00
Ben Kelly d0d806b51e Bug 1436812 P9 Implement the ServiceWorkerContainer::Register() method using the inner class. r=baku 2018-04-23 09:46:55 -07:00
Ben Kelly e8d1b10096 Bug 1436812 P8 Move storage permission check and other window specific code to ServiceWorkerContainer. r=baku 2018-04-23 09:46:55 -07:00
Ben Kelly 557e712b93 Bug 1436812 P7 Move many checks into ServiceWorkerScopeAndScriptAreValid() utility method. r=baku 2018-04-23 09:46:55 -07:00
Ben Kelly 854148c72a Bug 1436812 P6 Move the NS_CheckContentLoadPolicy() from ServiceWorkerManager to ServiceWorkerContainer. r=baku 2018-04-23 09:46:54 -07:00
Ben Kelly f7eb2e8f22 Bug 1436812 P5 Move the IsFromAuthenticatedOrigin() check from the ServiceWorkerManager to the ServiceWorkerContainer. r=baku 2018-04-23 09:46:54 -07:00
Ben Kelly e92e735f00 Bug 1436812 P2 Don't try to use the document's nsILoadGroup when registering a new service worker script. r=baku 2018-04-23 09:46:54 -07:00
Boris Zbarsky 597b4545d2 Bug 1429903 part 4. Remove nsIDOMEventTarget. r=mccr8
MozReview-Commit-ID: 9XuenUHxfPx
2018-04-20 00:49:30 -04:00
Andrea Marchesini c3b61ca1bf Bug 1252998 - StorageActivityService - part 4 - Introduce ServiceWorkerCleanUp.jsm to clean up ServiceWorker data, r=asuth 2018-04-18 18:19:12 +02:00
Andrea Marchesini 770b7bb21e Bug 1252998 - StorageActivityService - part 3 - ServiceWorkerManager must not cleanup data when purge-session-history notification is dispatched, r=asuth 2018-04-18 18:19:11 +02:00
Ben Kelly 9fc1327a84 Bug 1452528 Don't clear the controller on non-subresource channel loads when redirect mode is "follow". r=baku 2018-04-17 12:38:34 -07:00
Ben Kelly 193dfe8914 Bug 1454646 P5 Implement ServiceWorkerContainer::GetRegistrations() via the inner class. r=baku 2018-04-17 07:46:15 -07:00
Ben Kelly fe955c0266 Bug 1454646 P3 Implement ServiceWorkerContainer::GetRegistration() via the inner clas. r=baku 2018-04-17 07:46:14 -07:00
Ben Kelly 598c11105d Bug 1452244 Avoid empty entries in serviceworker.txt. r=asuth 2018-04-09 10:54:23 -07:00
Ben Kelly 4fe4b22209 Bug 1448141 P2 Uninstall the service worker registration if update fails while its scripts are missing from offline storage. r=asuth 2018-04-02 07:50:22 -07:00
Christoph Kerschbaumer a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Andrew Sutherland 4d059b2890 Bug 1446225 - Ensure client id's are consistently {}-less UUIDs. r=catalinb
Our Client.id values were being normalized from "{uuid}" to "uuid", but not
our FetchEvent.clientId values.  Because nsID::Parse accepts both forms,
this was not being caught by any tests.

Although there are ServiceWorker WPT tests that verify consistency of
returned Client.id values across multiple matchAll invocations (ex:
client-id.https.html), there are no tests that compare Client.id with
FetchEvent.clientId.  All the tests largely use Clients.get() to verify
correctness/round-tripping.  I looked into adding WPT tests, but we
quickly run into the test logistics problem where it's preferable to
avoid adding tests that involve effectively global state.

So, this patch:
- Changes Clients::Get() to explicitly treat client id's that start with a
  "{" as invalid.  This causes existing FetchEvent.clientId-related WPT
  tests to fail, as we would hope.
- Duplicates the client id normalization logic that strips {} for the
  FetchEvent.clientId to its point of origin in
  ContinueDispatchFetchEventRunnable::Run.
- Augments our dom/serviceworkers/test/test_match_all_client_properties.html
  test, which has been enforcing {}-less UUIDs for a while, to also test
  FetchEvent.clientId to verify it conforms.  I added some comments to the
  test files too.

--HG--
extra : rebase_source : dd6d07ea880eb2c3115d8810ea246b4469ad5f96
2018-03-22 11:33:13 -04:00
Ben Kelly 2a7fb98abb Bug 1448012 P4 Remove stale service worker ready promise code. r=asuth 2018-03-22 13:03:22 -07:00
Ben Kelly a19be18f97 Bug 1448012 P3 Add new ServiceWorkerContainer.ready mechanism based on MozPromise. r=asuth 2018-03-22 13:03:22 -07:00
Ben Kelly 5706606e9b Bug 1438211 P5 Replace direct window/worker calls with nsIGlobalObject::GetOrCreateServiceWorkerRegistration(). r=asuth
--HG--
extra : rebase_source : 2b0f83a5e5a6e5eeac9e1401168c6653b6250c23
2018-03-02 13:02:50 -08:00
Ben Kelly 93c381f6bd Bug 1440705 P1 Make SWM clear the reserved client when performing an STS upgrade with child-process interception. r=asuth 2018-02-28 10:32:50 -08:00
Ben Kelly 75bf35692e Bug 1440407 P2 Remove some unnecessary nsPIDOMWindowInner QI to nsIGlobalObject. r=mystor 2018-02-22 14:28:39 -08:00
Ben Kelly 3ebceab018 Bug 1434701 P6 Make ServiceWorkerRegistrationListener updates take a ServiceWorkerRegistrationDescriptor. r=asuth 2018-02-14 14:23:16 -05:00
Ben Kelly 74bf5d1616 Bug 1434701 P4 Move ServiceWorkerRegistrationListener into its own header. r=asuth 2018-02-14 14:23:15 -05:00
Ben Kelly de795dbd34 Bug 1434701 P1 Make ServiceWorkerRegistration::CreateForMainThread() take a ServiceWorkerRegistrationDescriptor. r=catalinb r=asuth 2018-02-14 14:23:15 -05:00
Ben Kelly af73b55e78 Bug 1434342 P7 Use the global to GetOrCreate the ServiceWorker DOM instance. r=asuth 2018-01-31 09:10:27 -08:00
Ben Kelly 84065537b6 Bug 1433505 P2 Make various class members on ServiceWorkerRegistrationInfo private. r=asuth 2018-01-31 08:29:49 -08:00
Andrea Marchesini 26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00