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

111 Коммитов

Автор SHA1 Сообщение Дата
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
Ben Kelly 9e928c88fb Bug 1438211 P2 Implement nsGlobalWindowInner::GetOrCreateServiceWorkerRegistration(). r=asuth
--HG--
extra : rebase_source : 7fa79752d66f9955f574e49e094cdd7fff512306
2018-03-02 13:02:49 -08:00
Catalin Badea b1123e2859 Bug 1442894 - Avoid race in test_self_update_worker.html r=asuth
1. Wait for 'activating' state, since it's possible never to reach
'activated'.
2. nit change: Don't set the grace timeout to zero. This makes the test
run faster.
2018-03-08 12:45:44 +00:00
Olli Pettay 2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Catalin Badea a260a0500b Bug 1432846 - Add test for self updating service worker. r=bkelly 2018-03-02 11:40:59 +00:00
Catalin Badea d116fe517c Bug 1432846 - Delay update runnables from service workers that don't control any clients. r=bkelly 2018-03-02 11:40:53 +00:00
Sebastian Hengst 226c2ef8a3 Backed out 3 changesets (bug 1432846) for build bustage on Windows at dom/serviceworkers/ServiceWorkerRegistrationImpl.cpp:301. CLOSED TREE
Backed out changeset 5e3b28d03b34 (bug 1432846)
Backed out changeset a2ae02b5fe72 (bug 1432846)
Backed out changeset a92cc56bbaa4 (bug 1432846)
2018-03-01 21:34:05 +02:00
Catalin Badea 8b92d81fee Bug 1432846 - Clear test state in between multiple runs. a=testonly 2018-03-01 17:21:22 +00:00
Catalin Badea c2e89ca6b0 Bug 1432846 - Add test for self updating service worker. r=bkelly 2018-03-01 16:35:14 +00:00
Catalin Badea 2443202da8 Bug 1432846 - Delay update runnables from service workers that don't control any clients. r=bkelly 2018-03-01 16:34:48 +00:00
Ben Kelly acdc46399c Bug 1441133 P2 Verify inherited frames do not trigger service worker storage assertions. r=asuth 2018-03-01 08:13:56 -08:00
Csoregi Natalia 1fd0486e23 Backed out 7 changesets (bug 1193394) for browser-chrome failures on browser_ext_popup_background.js. CLOSED TREE
Backed out changeset 9683f24ff8ec (bug 1193394)
Backed out changeset 0e7140a7c841 (bug 1193394)
Backed out changeset a0e26f6b2784 (bug 1193394)
Backed out changeset 29e1fceaf48d (bug 1193394)
Backed out changeset b8632bbbd273 (bug 1193394)
Backed out changeset a54ef2d8f896 (bug 1193394)
Backed out changeset 55c94c05c57f (bug 1193394)
2018-03-01 16:29:02 +02:00
Sebastian Hengst 6098a3cc4d merge mozilla-central to mozilla-inbound. CLOSED TREE 2018-03-01 12:29:42 +02:00
Sebastian Hengst 3eb3941bc5 Backed out 2 changesets (bug 1441133) for build bustage in beta simulations at dom/clients/manager/ClientSource.cpp:402: unused variable 'wp'. a=backout
Backed out changeset 275855621865 (bug 1441133)
Backed out changeset 7a4546e25adc (bug 1441133)

--HG--
extra : histedit_source : d38746923972091f05ad8f435c39e7fe38e57a18
2018-03-01 11:55:28 +02: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 897d177592 Bug 1441133 P2 Verify inherited frames do not trigger service worker storage assertions. r=asuth 2018-02-28 10:31:29 -08:00
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Tooru Fujisawa 9a32a77bc1 Bug 1435910 - Part 0.2: Add BrowserTestUtils.{promiseAlertDialogOpen,promiseAlertDialog}. r=Gijs 2018-02-28 10:36:42 +09:00
Olli Pettay b7726493fb Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +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 deec3fa995 Bug 1438541 P2 Make nsIGlobalObject::GetOrCreateServiceWorker() use the DOMEventTargetHelper list stored on the global. r=smaug 2018-02-21 10:53:52 -08:00