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

131 Коммитов

Автор SHA1 Сообщение Дата
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 5d9d638f47 Bug 1454646 P4 Factor out a method for checking global validity in ServiceWorkerContainer to reduce code duplication. r=baku 2018-04-17 07:46:14 -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 13c73ec777 Bug 1454646 P2 Implement ServiceWorkerContainer::GetReady() via the Inner class. r=baku 2018-04-17 07:46:14 -07:00
Ben Kelly a7ef225557 Bug 1454646 P1 Add a ServiceWorkerContainer::Inner scaffold. r=baku 2018-04-17 07:46:14 -07:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Catalin Badea e517621ded Bug 1402892 - Update mochitests related to request.context. r=asuth
This patch removes mochitests that were testing only request.context and
updates a couple others to use request.destination instead.
2018-04-11 13:23:27 +01:00
Nika Layzell da7423dfa5 Bug 1444151 - Part 4: Remove the now-unnecessary xpcom-style segment getters, r=valentin 2018-04-10 17:49:50 -04:00
Ben Kelly 8e02995e8a Bug 1452373 Only allow one runnable to write to serviceworker.txt at a time. r=asuth 2018-04-10 12:31:18 -07:00
Ben Kelly 4d9ff997d3 Bug 1450274 P2 Make ServiceWorkerRegistration use DETH::KeepAliveIfHasListenersFor(). r=asuth 2018-04-10 11:00:56 -07:00
Ben Kelly 21a91c3b30 Bug 1450274 P1 Make ServiceWorker use DOMEventTargetHelper::KeepAliveIfHasListenersFor(). r=asuth 2018-04-10 11:00:56 -07:00
Ben Kelly 598c11105d Bug 1452244 Avoid empty entries in serviceworker.txt. r=asuth 2018-04-09 10:54:23 -07:00
Margareta Eliza Balazs 46479527fd Backed out 3 changesets (bug 1402892) for wpt failures in /fetch/api/request/request-idl.html on a CLOSED TREE
Backed out changeset 7218641c9b12 (bug 1402892)
Backed out changeset 2fce477733f0 (bug 1402892)
Backed out changeset 34e219813b64 (bug 1402892)
2018-04-09 20:01:12 +03:00
Catalin Badea 7e334203f9 Bug 1402892 - Update mochitests related to request.context. r=asuth
This patch removes mochitests that were testing only request.context and
updates a couple others to use request.destination instead.
2018-04-09 16:29:28 +01:00
Ben Kelly 2bf2ff691e Bug 1452374 - Remove ServiceWorkerRegistrar retry mechanism to fix intermittent shutdown failures. r=baku 2018-04-09 07:18:00 -04:00
Ben Kelly 0a7ab378d1 Bug 1450991 Retry failed ServiceWorkerRegistrar saves and never wipe registrar data if saving fails. r=asuth 2018-04-06 14:50:38 -07:00
Boris Zbarsky 55cdcb3d94 Bug 1451929. Get rid of DOMCursor. r=qdot 2018-04-05 20:31:03 -04:00
Boris Zbarsky 4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Ben Kelly 5e3b64d3ec Bug 1450358 P0 Factor the event listener runtime leak checking test into a reusable test framework. r=baku 2018-04-04 11:25:42 -07:00
Ben Kelly 96a73bdbed Bug 1450874 P1 If a service worker script self closes due to a compilation error, then don't re-use the worker for further events. r=asuth 2018-04-03 19:53:21 -07:00
Ben Kelly a6499922db Bug 1448141 P5 Remove the service worker script load failure runnable. r=asuth 2018-04-02 07:50:23 -07:00
Ben Kelly 91f05c3bac Bug 1448141 P3 Add a browser chrome test verifying service workers handles its scripts being wiped. r=asuth 2018-04-02 07:50:22 -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
Ben Kelly dcad56bf27 Bug 1447871 P2 Add a mochitest to test leaks due to service worker binding object usage. r=asuth 2018-03-30 11:25:48 -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
Jonathan Watt 82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +00:00
Boris Zbarsky 9e7585ff47 Bug 1446527 part 7. Remove the various NS_FORWARD_TO_EVENT bits. r=qdot
We no longer have multiple inheritance from nsIDOMEvent anywhere.

This looks like it saves 20KB of codesize or so.

MozReview-Commit-ID: qJtM7QNu9z
2018-03-26 14:53:03 -04:00
Ben Kelly 020b7a4a64 Bug 1445475 - Make service worker self-update fallibly store its timer on the private and cleanup if that fails. r=catalinb 2018-03-22 07:45:00 -04: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 dd2eacf617 Bug 1448012 P2 Eagerly create the ServiceWorkerContainer.controller. r=asuth 2018-03-22 13:03:22 -07:00
Ben Kelly 6c73c2345a Bug 1448012 P1 Add ServiceWorkerContainer::Create() factory method. r=asuth 2018-03-22 13:03:22 -07:00
Ben Kelly bb67e81bca Bug 1443850 P1 Don't try to apply the request fragment to an empty response URL when perform service worker interception. r=asuth
--HG--
extra : rebase_source : 017f8afba4af4984d59056a7f44b088eee9b2488
2018-03-19 13:29:00 +02:00
Tooru Fujisawa 1adba8c1fc Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
Andrea Marchesini 0586913a90 Bug 1446287 - Port AllowWindowInteractionHandler to WorkerRef, r=catalinb 2018-03-16 15:46:21 +01:00
Andrea Marchesini 5050d63343 Bug 1445894 - Move serviceworkers gtest into dom/serviceworkers/test, r=catalinb
--HG--
rename : dom/workers/test/gtest/TestReadWrite.cpp => dom/serviceworkers/test/gtest/TestReadWrite.cpp
rename : dom/workers/test/gtest/moz.build => dom/serviceworkers/test/gtest/moz.build
2018-03-15 14:46:03 +01:00
Andrea Marchesini 330807a747 Bug 1445554 - Remove the raw pointer WorkerPrivate from ServiceWorkerRegistrationImpl, r=catalinb 2018-03-15 08:57:05 +01:00
Andrea Marchesini 0f2dc46935 Bug 1445554 - Use of WorkerRef in ServiceWorkerRegistrationImpl, r=catalinb 2018-03-15 08:57:05 +01:00
Kris Maglione a036df8b65 Bug 1403348: Part 4 - Annotate certain startup crashes with AsyncShutdown script contents. r=mccr8 data-r=rweiss
We're seeing startup crashes which point to data corruption in the source of
the AsyncShutdown component and module, but it's unclear whether the source of
this corruption is on disk, in memory, or in XDR data.

This change annotates crash reports with the contents of those files, so that
we can compare the actual source with the corrupted values in the generated
errors, and narrow down the source of the corruption.

MozReview-Commit-ID: 7p8y73XUGLK

--HG--
extra : rebase_source : 8e1b85df0cf69556af6f998f3d638bf2033e6ca0
extra : source : cf8613751378c8790b56131cd2a1be68573f9286
2017-11-04 17:20:17 -07:00
Csoregi Natalia 16068f9f72 Backed out changeset cf8613751378 (bug 1403348) for Build Bustage on ServiceWorkerRegistrar.cpp:29. CLOSED TREE 2018-03-09 00:59:11 +02:00
Kris Maglione fac1655973 Bug 1403348: Part 4 - Annotate certain startup crashes with AsyncShutdown script contents. r=mccr8 data-r=rweiss
We're seeing startup crashes which point to data corruption in the source of
the AsyncShutdown component and module, but it's unclear whether the source of
this corruption is on disk, in memory, or in XDR data.

This change annotates crash reports with the contents of those files, so that
we can compare the actual source with the corrupted values in the generated
errors, and narrow down the source of the corruption.

MozReview-Commit-ID: 7p8y73XUGLK

--HG--
extra : rebase_source : ad31c4fae1cb5c931e166702499dd1e56758d3e3
2017-11-04 17:20:17 -07:00
Ben Kelly 5cf84a8b75 Bug 1438211 P9 Remove nsPIDOMWindowInner::GetServiceWorkerRegistration() and InvalidateServiceWorkerRegistration(). r=asuth
--HG--
extra : rebase_source : a02d0490415c01f7c3330de17f9040344b4b96d4
2018-03-02 13:02:50 -08:00
Ben Kelly cfe642ab1a Bug 1438211 P8 Hold the ServiceWorkerRegistration alive until the global is detached or the backing ServiceWorkerRegistrationInfo is removed. r=asuth
--HG--
extra : rebase_source : 476e6d6a55d5e2fdff41d87d86ce9d0818361a39
2018-03-08 13:43:33 -05:00
Ben Kelly eb738424f1 Bug 1438211 P7 Hold the ServiceWorker object alive until either the window is closed or the backing ServiceWorkerInfo becomes redundant. r=asuth
--HG--
extra : rebase_source : 9edc60c9faee7410b95953fc28240618d46aef14
2018-03-02 13:02:50 -08:00
Ben Kelly d4faed071a Bug 1438211 P6 Add an integer identifier to each ServiceWorkerRegistrationDescriptor. r=asuth
--HG--
extra : rebase_source : b61dc3d41d0ad73e5465a1f598fd09195120b9e4
2018-03-02 13:02:50 -08: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 b7cbf79c03 Bug 1438211 P4 Actually set the worker global on ServiceWorkerRegistration. r=asuth
--HG--
extra : rebase_source : 402ab15468191e61d597a246e1f2d8a05f8ee03a
2018-03-02 13:02:50 -08:00