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

13 Коммитов

Автор SHA1 Сообщение Дата
Yaron Tausky eed877a1a1 Bug 1607276 - Hold strong reference before calling method r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D61470

--HG--
extra : moz-landing-system : lando
2020-02-10 16:02:31 +00:00
Boris Zbarsky 6c66fa85a4 Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark
The rejection process consumes the ErrorResult, so an rvalue reference is the honest thing here.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 15:42:30 +00:00
Perry Jiang 044d7a6a91 Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth
- Cleaned up some comments.
- Changed some const nsACString& parameter types to nsCString to accept r-value
  and l-value nsCStrings.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 03:21:27 +00:00
Perry Jiang 96edc2a092 Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth
- Remove `ServiceWorkerRegistration`s' pending uninstall flag.

- Rename `ServiceWorkerRegistrationListener`'s `RegistrationRemoved` method to
  `RegistrationCleared`; registrations are no longer necessarily consider
  invalid when they are removed from the "scope to registration map", but rather
  when they're both removed from the map and not controlling clients (at which
  point `Clear` is called).

- Maintain the invariant that no `ServiceWorkerRegistrationInfo` in
  `ServiceWorkerManager::RegistrationDataPerPrincipal::mInfos` (i.e. the "scope
  to registration map") is in the unregistered state. Assertions check this in
  `ServiceWorkerManager::AddScopeAndRegistration` and
  `ServiceWorkerRegistrationInfo::SetUnregistered`.

- Fix some incorrect web platform tests.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 18:41:48 +00:00
Andrea Marchesini dda55c2dec Bug 1559919 - Finish the WorkerHolder cleanup - part 5 - IPCWorkerRef in ServiceWorkerRegistrationChild, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D35224

--HG--
extra : moz-landing-system : lando
2019-07-12 11:16:34 +00:00
Jean-Yves Avenard 48517afae6 Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.

While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 19:22:26 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Blake Kaplan 13fc0d95f9 Bug 1510809 - Fire updatefound correctly for SWC.register r=asuth
Currently, we are required to fire updatefound in three cases:

  * When a "soft" update finds an update.
  * When a call to ServiceWorkerRegistration.update finds an update.
  * When ServiceWorkerContainer.register registers a ServiceWorker.

In the first case, there are no requirements on the timing of the event. For
the second two cases, however, the promise returned by update or register
needs to resolve before updatefound is dispatched. We hack around the first
case by explicitly counting the calls to update and only dispatching
updatefound when the final promise resolves. In the case of SWC.register, the
ServiceWorkerRegistration object might not even exist when it notices that we
need to fire updatefound, which suggests that we need some code to tell it
when to fire the event; except that in the soft update case, there is no
obvious place to do so. So, the easiest way to resolve this is to have the
parent process tell the ServiceWorkerRegistration when to fire updatefound
itself. This way, we don't rely on any tricky timing and everything is
consistent with itself.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 23:06:32 +00:00
Andrea Marchesini bc5414c5f3 Bug 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
Ben Kelly e9dc1bae32 Bug 1459209 P11 Propogate registration state changes back from the parent to the child. r=mrbkap
--HG--
extra : rebase_source : 86bea6e7bcf6376d1fc5366a1a07b208f3805ce0
2018-07-09 16:02:40 -07:00
Ben Kelly 39b1a104c9 Bug 1459209 P10 Implement RemoteServiceWorkerRegistrationImpl::Unregister() across IPC to the parent-side SWM. r=mrbkap
--HG--
extra : rebase_source : 8411bc26ff172a9888e040fc09b21cab745e4161
2018-07-09 16:02:40 -07:00
Ben Kelly 94f85205a9 Bug 1459209 P9 Implement RemoteServiceWorkerRegistrationImpl::Update() across IPC to the parent-side SWM. r=mrbkap
--HG--
extra : rebase_source : 87d77ea7472b59b7e0d243d714ad19158cd7c332
2018-07-09 16:02:40 -07:00
Ben Kelly e486332066 Bug 1459209 P4 Scaffold RemoteServiceWorkerRegistrationImpl to connect the binding registration to the actor. r=mrbkap
--HG--
extra : rebase_source : 6e113ac5ead01a50d8dcdd5c0124c42901b84c5e
2018-07-09 16:02:39 -07:00