New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758151 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 629701



Sign in to add a comment

Impl mojo interface ServiceWorkerRegistrationObjectHost

Project Member Reported by leon....@intel.com, Aug 23 2017

Issue description

Draft idea for discussion:

interface ServiceWorkerRegistrationHost {
  // Replace old IPC ServiceWorkerHostMsg_UpdateServiceWorker
  Update() 
    => (blink.mojom.ServiceWorkerErrorType error,
        mojo.common.mojom.String16? error_msg);

  // Replace old IPC ServiceWorkerHostMsg_UnregisterServiceWorker
  Unregister()
    => (blink.mojom.ServiceWorkerErrorType error,
        mojo.common.mojom.String16? error_msg);

  // Replace old IPC ServiceWorkerHostMsg_IncrementRegistrationRefCount
  IncrementRefCount();

  // Replace old IPC ServiceWorkerHostMsg_DecrementRegistrationRefCount
  DecrementRefCount(); 
}

Browser-side behavior:
1.
Let ServiceWorkerRegistrationHandle impl the above interface
2.
Let ServiceWorkerRegistrationHandle maintain a binding set of mojo connections.
3.
ServiceWorkerRegistrationHandle holds a reference of corresponding ServiceWorkerRegistration instance, which can be leveraged to do actual work.

Renderer side behavior:
1.
Let ServiceWorkerRegistrationHandleReference hold the mojo interface ptr.
2.
Let ServiceWorkerRegistrationHandleReference use the mojo interface ptr to do the work of old IPCs DecreRefCount and IncreRefCount before.
3.
Let WebServiceWorkerRegistrationImpl use the mojo interface ptr to impl its functions Update() and Unregister(), instead of asking for ServiceWorkerDispatcher.

How to establish the mojo connection:
For both sw context and client context, just create&bind a new mojom::ServiceWorkerRegistrationHostPtr and pass it along the same path of passing ServiceWorkerRegistrationObjectInfo currently.
 

Comment 1 by leon....@intel.com, Aug 23 2017

Update:

interface ServiceWorkerRegistrationHost {
  // Replace old IPC ServiceWorkerHostMsg_UpdateServiceWorker
  Update() 
    => (blink.mojom.ServiceWorkerErrorType error,
        mojo.common.mojom.String16? error_msg);

  // Replace old IPC ServiceWorkerHostMsg_UnregisterServiceWorker
  Unregister()
    => (blink.mojom.ServiceWorkerErrorType error,
        mojo.common.mojom.String16? error_msg);

  // Replace old IPCs ServiceWorkerHostMsg_{Incre,Decre}mentRegistrationRefCount
  // Clone() establishes a new mojo connection. And ServiceWorkerRegistrationHost implementation class(ServiceWorkerRegistrationHandle) lifetime is bound with the number of connections, it destroys itself once all mojo connections gone away.
  Clone(associated ServiceWorkerRegistrationHost& request);
}

Comment 2 by falken@chromium.org, Aug 24 2017

Can you explain why Clone() is needed? I thought one ServiceWorkerRegistration JavaScript object in the renderer would be connected to one ServiceWorkerRegistrationHost in the browser. When Blink garbage collects the SWRegistration, some binding should be destroyed which destroys the SWRegistrationHost.

BTW to split impl into steps, for the first step of just moving from the Register IPC to the ContainerHost Register() method, I thought we could re-use the "handle id" stuff for now.

Comment 3 by leon....@intel.com, Aug 25 2017

Yeah the mapping relationship should be like following:
1.
Inside renderer process, multiple ServiceWorkerRegistration JavaScript objects(on one specific execution context) reference-own one C++ WebServiceWorkerRegistrationImpl, which may destroyed due to blink garbage collection. We won't change this logic.
2.
One renderer-side WebServiceWorkerRegistrationImpl maps with one browser-side ServiceWorkerRegistrationHandle(owns one ServiceWorkerRegistration), the key is ServiceWorkerRegistrationObjectInfo::handle_id. Even after mojofication, I think we still need this handle_id to help establish the mapping relationship in renderer-side, the detail is at https://cs.chromium.org/chromium/src/content/child/service_worker/service_worker_dispatcher.cc?rcl=f16e90904fb2df1866eb8580543c32528e557a60&l=374.
3.
Inside browser process, ServiceWorkerRegistrationHandle holds a |ref_count_| to control lifetime of ServiceWorkerRegistration, its functionality is described at https://cs.chromium.org/chromium/src/content/browser/service_worker/service_worker_registration_handle.h?rcl=7d803fd8bbb8a2f3b626851a5ce58244efa0798a&l=26.

I'd like to eliminate |ref_count_|, instead, use mojo binding set to control lifetime of ServiceWorkerRegistration.
Usually a mojo connection is started from browser-side(similar with ++ref_count_ before), the end point would be passed to renderer-side, renderer-side can choose to maintain this connection, or just drop the connection(similar with sending ServiceWorkerHostMsg_DecrementRegistrationRefCount IPC before) if it found out that there is already an available connection.
And 'Clone(associated ServiceWorkerRegistrationHost& request);' intends to start a new mojo connection from renderer-side, similar with sending erviceWorkerHostMsg_IncrementRegistrationRefCount IPC before.

After all above work done, we should be able to:
1.
Eliminate ServiceWorkerRegistrationObjectInfo::registration_id.
2.
Avoid creating WebServiceWorkerProviderImpl for SW context, because currently it's just used to get provider id for the sake of sending Update/Unregister IPCs, while mojofied Update/Unregister do not need provider id any more, so the WebServiceWorkerProviderImpl for SW context may become totally useless? Of course, if we want to impl navigator.serviceWorker for SW context soon, we can keep current WebServiceWorkerProviderImpl as is.

Comment 4 by leon....@intel.com, Aug 30 2017

At https://cs.chromium.org/chromium/src/content/child/service_worker/web_service_worker_registration_impl.h?rcl=17d17db14b68a71f2bd48b9795ebf5c95ad6c1d6&l=28 there is such a comment:
"
// Each instance corresponds to one ServiceWorkerRegistration object in JS
// context, and is held by ServiceWorkerRegistration object in Blink's C++ layer
// via WebServiceWorkerRegistration::Handle.
"

To make sure I understand it completely, I have a question as following:
It's true that each WebServiceWorkerRegistrationImpl is held by a ServiceWorkerRegistration object in Blink's C++ layer via WebServiceWorkerRegistration::Handle, but I think the one ServiceWorkerRegistration object in Blink's C++ layer may correspond with multiple ServiceWorkerRegistration objects in JS context, the reason is at https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp?rcl=eae372c09940a9b140b7b127cbe20b52704aa03e&l=73. Then we should say each WebServiceWorkerRegistrationImpl may correspond with multiple ServiceWorkerRegistration JS objects.

For example:
  navigator.serviceWorker.register('sw.js', {
    scope: './'
  }).then(function(sw_reg1) {});
  navigator.serviceWorker.getRegistration('./').then(function(sw_reg2) {});
Both sw_reg1 and sw_reg2 correspond with only one ServiceWorkerRegistration object in Blink's C++ layer, which corresponds with one WebServiceWorkerRegistrationImpl C++ object in embedder layer.

Comment 5 by falken@chromium.org, Aug 30 2017

I think the idea is sw_reg1 === sw_reg2, i.e, they point to the same JavaScript object (two references to the same object).

Comment 6 by leon....@intel.com, Sep 1 2017

I'm planning to let ServiceWorkerRegistrationObjectInfo carry the ServiceWorkerRegistrationHost mojo associated interface ptr info to renderer side.

Currently content::ServiceWorkerRegistrationObjectInfo is a native C++ struct being transported via both legacy IPCs and mojo connection, and it's typemapping with mojom struct content.mojom.ServiceWorkerRegistrationObjectInfo based on legacy struct traits. 
Although legacy IPC struct traits is able to pass a mojo::MessagePipeHandle(mojo interface ptr info), seems not able to pass a mojo ASSOCIATED interface ptr info.

So I think as a preparation firstly we'd better apply the mojom struct everywhere to eliminate the native struct content::ServiceWorkerRegistrationObjectInfo. And I suppose the content.mojom.ServiceWorkerRegistrationObjectInfo definition should be put into WebKit/common/service_worker to prepare for later usage inside Blink.
WDYT? Thanks.
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/abf675b3119efa6fd9b548dc3815dcb081fd40ad

commit abf675b3119efa6fd9b548dc3815dcb081fd40ad
Author: Han Leon <leon.han@intel.com>
Date: Tue Sep 12 07:02:58 2017

[ServiceWorker] Apply mojom struct ServiceWorkerRegistrationOptions everywhere

This CL replaces native struct content::ServiceWorkerRegistrationOptions
with mojom struct blink.mojom.ServiceWorkerRegistrationOptions.

BUG= 758151 

Change-Id: Ic7142a0db0967fdb0e2c766f5b46d4ec1b4f66b4
Reviewed-on: https://chromium-review.googlesource.com/657257
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#501204}
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/DEPS
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/background_fetch/background_fetch_test_base.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/background_sync/background_sync_service_impl_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/notifications/platform_notification_context_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/embedded_worker_instance_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/link_header_support_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_context_core.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_context_core.h
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_context_request_handler_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_context_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_context_watcher_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_data_pipe_reader_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_handle_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_installed_scripts_sender_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_job_coordinator.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_job_coordinator.h
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_provider_host_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_register_job.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_register_job.h
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_script_url_loader_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_storage_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_url_loader_job_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_version_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/child/BUILD.gn
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/child/service_worker/web_service_worker_provider_impl.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/common/DEPS
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/common/service_worker/service_worker_container.mojom
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/common/service_worker/service_worker_types.cc
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/common/service_worker/service_worker_types.h
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/common/service_worker/service_worker_types.mojom
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/content/common/service_worker/service_worker_types.typemap
[modify] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/abf675b3119efa6fd9b548dc3815dcb081fd40ad/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ce3451bb91eb00ddc06a3c46ea08500ed9f21c8

commit 8ce3451bb91eb00ddc06a3c46ea08500ed9f21c8
Author: Han Leon <leon.han@intel.com>
Date: Wed Sep 13 03:03:13 2017

[ServiceWorker] Cleanup for codes of service worker registration update

BUG= 758151 

Change-Id: I3b53764330d046aa95f23f8a388df97408b61111
Reviewed-on: https://chromium-review.googlesource.com/662579
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#501530}
[modify] https://crrev.com/8ce3451bb91eb00ddc06a3c46ea08500ed9f21c8/content/browser/service_worker/service_worker_dispatcher_host.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc

commit ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc
Author: Han Leon <leon.han@intel.com>
Date: Wed Sep 13 09:59:32 2017

[ServiceWorker] Apply mojom struct ServiceWorkerRegistrationObjectInfo everywhere

This CL replaces native struct
content::ServiceWorkerRegistrationObjectInfo with mojom struct
blink.mojom.ServiceWorkerRegistrationObjectInfo.

BUG= 758151 

Change-Id: I8e79e1d7ed46ca12c247d83448be0531e3818e50
Reviewed-on: https://chromium-review.googlesource.com/662369
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#501582}
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/background_fetch/background_fetch_registration_id.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/background_fetch/background_fetch_test_base.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/notifications/notification_database.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/notifications/platform_notification_context_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/embedded_worker_instance_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_context_core.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_context_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_context_watcher.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_context_watcher_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_database_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_info.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_register_job.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_registration_handle.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_storage.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_storage_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/browser/service_worker/service_worker_unregister_job.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_dispatcher_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_network_provider.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_provider_context.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_provider_context.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_provider_context_unittest.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_registration_handle_reference.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/service_worker_registration_handle_reference.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/web_service_worker_provider_impl.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/web_service_worker_provider_impl.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/common/service_worker/service_worker_container.mojom
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/common/service_worker/service_worker_provider.mojom
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/common/service_worker/service_worker_types.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/common/service_worker/service_worker_types.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/common/service_worker/service_worker_types.mojom
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/common/service_worker/service_worker_types.typemap
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
[modify] https://crrev.com/ed7ee8ee5f1b9d8dc47501b778c0cae22f56a0dc/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Comment 10 by leon....@intel.com, Sep 27 2017

Blocking: -755836 629701

Comment 11 by leon....@intel.com, Sep 27 2017

Summary: Impl mojo interface ServiceWorkerRegistrationObjectHost (was: Impl mojo interface ServiceWorkerRegistrationHost)
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8b924b4f9c5b35754d95ce7517b357ae824bcea

commit d8b924b4f9c5b35754d95ce7517b357ae824bcea
Author: Han Leon <leon.han@intel.com>
Date: Thu Sep 28 13:36:20 2017

[ServiceWorker] Introduce ServiceWorkerRegistrationObjectHost interface.

This CL introduces ServiceWorkerRegistrationObjectHost interface
and eliminates 2 legacy IPCs:
  ServiceWorkerHostMsg_IncrementRegistrationRefCount
  ServiceWorkerHostMsg_DecrementRegistrationRefCount

BUG= 758151 

Change-Id: Ia401b2fd77251686aefdcdd8fca6f69bb6ac2084
Reviewed-on: https://chromium-review.googlesource.com/665097
Commit-Queue: Han Leon <leon.han@intel.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505002}
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_registration_handle.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_test_utils.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/browser/service_worker/service_worker_test_utils.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/BUILD.gn
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/service_worker_dispatcher_unittest.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/service_worker_network_provider.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/service_worker_provider_context.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/service_worker_provider_context.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/service_worker_provider_context_unittest.cc
[delete] https://crrev.com/5738043de6fdc66517cbb09e98da8c4aa76be6c2/content/child/service_worker/service_worker_registration_handle_reference.cc
[delete] https://crrev.com/5738043de6fdc66517cbb09e98da8c4aa76be6c2/content/child/service_worker/service_worker_registration_handle_reference.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/child/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/d8b924b4f9c5b35754d95ce7517b357ae824bcea/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Comment 13 by leon....@intel.com, Sep 29 2017

Update:

interface ServiceWorkerRegistrationHost {
  Update();
  Unregister();
  EnableNavigationPreload();
  GetNavigationPreloadState();
  SetNavigationPreloadHeader();
}
Project Member

Comment 14 by bugdroid1@chromium.org, Oct 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00059eb874c103b6f9d79bba1a16be6e4dff2e3e

commit 00059eb874c103b6f9d79bba1a16be6e4dff2e3e
Author: Han Leon <leon.han@intel.com>
Date: Sat Oct 14 00:47:44 2017

[ServiceWorker] Implement ServiceWorkerRegistrationObjectHost.Update

This CL mojofies the following legacy IPCs:
  ServiceWorkerHostMsg_UpdateServiceWorker
  ServiceWorkerMsg_ServiceWorkerUpdated
  ServiceWorkerMsg_ServiceWorkerUpdateError

BUG= 758151 

Change-Id: I8f8fcfc5e092857f58ca2ac5a97fcc05f002560e
Reviewed-on: https://chromium-review.googlesource.com/691362
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#508892}
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/browser/service_worker/service_worker_registration_handle.h
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/child/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/child/service_worker/service_worker_dispatcher_unittest.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/child/service_worker/service_worker_provider_context_unittest.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/child/service_worker/web_service_worker_provider_impl.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/child/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/00059eb874c103b6f9d79bba1a16be6e4dff2e3e/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9e43849db23acbfaf4bd2fa2ff6e7edd7fc35e9d

commit 9e43849db23acbfaf4bd2fa2ff6e7edd7fc35e9d
Author: Han Leon <leon.han@intel.com>
Date: Wed Oct 18 10:45:19 2017

[ServiceWorker] Add unit tests related with interface ServiceWorkerRegistrationObjectHost

BUG= 758151 
TEST=content_unittests
  --gtest_filter=ServiceWorkerRegistrationHandleTest.*

Change-Id: I348b18919edee58ea5183ac0efedbdbe21e9fb90
Reviewed-on: https://chromium-review.googlesource.com/722723
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#509735}
[modify] https://crrev.com/9e43849db23acbfaf4bd2fa2ff6e7edd7fc35e9d/content/browser/service_worker/service_worker_registration_unittest.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4fb02e174c78df51b28bc7b3379aa744576525a

commit b4fb02e174c78df51b28bc7b3379aa744576525a
Author: Han Leon <leon.han@intel.com>
Date: Sat Oct 21 01:43:02 2017

[ServiceWorker] Implement ServiceWorkerRegistrationObjectHost.Unregister

This CL mojofies the following legacy IPCs:
  ServiceWorkerHostMsg_UnregisterServiceWorker
  ServiceWorkerMsg_ServiceWorkerUnregistered
  ServiceWorkerMsg_ServiceWorkerUnregistrationError

BUG= 758151 

Change-Id: Ibaa4bde05d9d79c7aff69585a5752f3ace2afcd5
Reviewed-on: https://chromium-review.googlesource.com/726956
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#510638}
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/browser/service_worker/service_worker_registration_handle.h
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/child/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/child/service_worker/service_worker_dispatcher_unittest.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/child/service_worker/service_worker_provider_context_unittest.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/child/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/b4fb02e174c78df51b28bc7b3379aa744576525a/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18

commit fe18926d0f0cec965a8e7fdf5958dbe926b9bb18
Author: xzhan96 <xiaofeng.zhang@intel.com>
Date: Wed Oct 25 04:15:00 2017

[ServiceWorker] Implement ServiceWorkerRegistrationObjectHost.EnableNavigationPreload

This CL mojofies the following legacy IPCs:
ServiceWorkerHostMsg_EnableNavigationPreload
ServiceWorkerMsg_DidEnableNavigationPreload
ServiceWorkerMsg_EnableNavigationPreloadError

BUG= 758151 

Change-Id: I858b4a629dc55b34e2cb68afe5e37c6adee2cd37
Reviewed-on: https://chromium-review.googlesource.com/731973
Commit-Queue: Xiaofeng Zhang <xiaofeng.zhang@intel.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511366}
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/browser/service_worker/service_worker_registration_handle.h
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/renderer/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/renderer/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/renderer/service_worker/service_worker_dispatcher_unittest.cc
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/renderer/service_worker/service_worker_provider_context_unittest.cc
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/content/renderer/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/fe18926d0f0cec965a8e7fdf5958dbe926b9bb18/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c355f6b8854b4c98a54e290f58d2f7d059ec78b3

commit c355f6b8854b4c98a54e290f58d2f7d059ec78b3
Author: xzhan96 <xiaofeng.zhang@intel.com>
Date: Thu Oct 26 03:23:01 2017

[ServiceWorker] Cleanup unused code after mojofication

After mojofication, we don't need send WebServiceWorkerProvider anymore.
And also remove a code missing when mojofy SetController.

BUG= 758151 ,  755861 

Change-Id: I4652d41bb6df6adf08b1fd0c914a1a1af469b0da
Reviewed-on: https://chromium-review.googlesource.com/737510
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Xiaofeng Zhang <xiaofeng.zhang@intel.com>
Cr-Commit-Position: refs/heads/master@{#511722}
[modify] https://crrev.com/c355f6b8854b4c98a54e290f58d2f7d059ec78b3/content/renderer/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/c355f6b8854b4c98a54e290f58d2f7d059ec78b3/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/c355f6b8854b4c98a54e290f58d2f7d059ec78b3/content/renderer/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/c355f6b8854b4c98a54e290f58d2f7d059ec78b3/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[modify] https://crrev.com/c355f6b8854b4c98a54e290f58d2f7d059ec78b3/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
[modify] https://crrev.com/c355f6b8854b4c98a54e290f58d2f7d059ec78b3/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h

Project Member

Comment 19 by bugdroid1@chromium.org, Nov 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/28debe29a4131b33faf2f5ae146f88699c4fad9f

commit 28debe29a4131b33faf2f5ae146f88699c4fad9f
Author: xzhan96 <xiaofeng.zhang@intel.com>
Date: Thu Nov 02 10:52:44 2017

[ServiceWorker] Implement ServiceWorkerRegistrationObjectHost.GetNavigationPreloadState

This CL replaces native struct content::NavigationPreloadState
with mojom struct blink.mojom.NavigationPreloadState.

And based on that, the CL mojofies the following legacy IPCs:
ServiceWorkerHostMsg_GetNavigationPreloadState
ServiceWorkerMsg_DidGetNavigationPreloadState
ServiceWorkerMsg_GetNavigationPreloadStateError

BUG= 758151 

Change-Id: Ic66ee17d9a5daa5b6118e193318ce0d4f46913b8
Reviewed-on: https://chromium-review.googlesource.com/743261
Commit-Queue: Xiaofeng Zhang <xiaofeng.zhang@intel.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513454}
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/DEPS
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_info.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_registration_handle.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_storage_unittest.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/common/DEPS
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/common/service_worker/service_worker_types.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/common/service_worker/service_worker_types.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/renderer/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/renderer/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/renderer/service_worker/service_worker_dispatcher_unittest.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/renderer/service_worker/service_worker_provider_context_unittest.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/content/renderer/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/third_party/WebKit/public/BUILD.gn
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
[add] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/third_party/WebKit/public/platform/modules/serviceworker/navigation_preload_state.mojom
[modify] https://crrev.com/28debe29a4131b33faf2f5ae146f88699c4fad9f/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 20 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6778193b05066e89227ddfbc608e34bfcadce933

commit 6778193b05066e89227ddfbc608e34bfcadce933
Author: xzhan96 <xiaofeng.zhang@intel.com>
Date: Mon Nov 06 03:20:22 2017

[ServiceWorker] Implement ServiceWorkerRegistrationObjectHost.SetNavigationPreloadHeader

This CL mojofies the following legacy IPCs:
ServiceWorkerMsg_SetNavigationPreloadHeader
ServiceWorkerMsg_DidSetNavigationPreloadHeader
ServiceWorkerMsg_SetNavigationPreloadHeaderError

BUG= 758151 

Change-Id: I14c8d8937d4fd4b150c64ad2eaa2cea83a4d35f6
Reviewed-on: https://chromium-review.googlesource.com/751101
Commit-Queue: Xiaofeng Zhang <xiaofeng.zhang@intel.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514083}
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/browser/service_worker/service_worker_registration_handle.h
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/renderer/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/renderer/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/renderer/service_worker/service_worker_dispatcher_unittest.cc
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/renderer/service_worker/service_worker_provider_context_unittest.cc
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/content/renderer/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
[modify] https://crrev.com/6778193b05066e89227ddfbc608e34bfcadce933/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

I tried to figure out how to merge SWRegistrationHandle into SWRegistration class, have some concerns now:
Although service_worker_registration_handle.h says:
  // This handle is the primary owner of this registration.
  scoped_refptr<ServiceWorkerRegistration> registration_;
seems it's not true? ServiceWorkerRegistration may be scoped refcounted in other places e.g. SWProviderHost keeps matching registrations etc.
That means ServiceWorkerRegistration lifetime should not be strongly tied to the Mojo connections of SWRegistrationObject from the renderer process.

Suggestion:
 - Rename SWRegistrationHandle to SWRegistrationHost.
 - Manage SWRegistrationHost per SWProviderHost with the key registration id, to replace current implementation which manages SWRegistrationHandle per ServiceWorkerDispatcherHost (per renderer process) with the key handle id. Such arrangement also aligns with the mapping management (https://chromium-review.googlesource.com/c/chromium/src/+/748907) in the renderer process, too.

WDYT? Thanks.
Project Member

Comment 22 by bugdroid1@chromium.org, Nov 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb

commit 4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb
Author: Han Leon <leon.han@intel.com>
Date: Wed Nov 15 12:18:37 2017

[ServiceWorker] Rename ServiceWorkerRegistrationHandle to ServiceWorkerRegistrationObjectHost

content::ServiceWorkerRegistrationHandle is implementation of interface
blink::mojom::ServiceWorkerRegistrationObjectHost, so it's more proper
to rename it to content::ServiceWorkerRegistrationObjectHost.

A follow-up CL will change to manage instances of
content::ServiceWorkerRegistrationObjectHost per
ServiceWorkerProviderHost rather than per ServiceWorkerDispatcherHost
(per renderer process).

BUG= 758151 

Change-Id: If5f7af3a6f275c267f314c93a80a28848f5ba285
Reviewed-on: https://chromium-review.googlesource.com/768603
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#516673}
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/BUILD.gn
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_registration.h
[rename] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_registration_object_host.cc
[rename] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_registration_object_host.h
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/4149b5c2e7f44e8e4061f5b74ef44e6f0e3e54eb/content/renderer/service_worker/web_service_worker_registration_impl.h

Project Member

Comment 23 by bugdroid1@chromium.org, Nov 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e1dc482127e914550d5bff15e8e1db4ea09245ef

commit e1dc482127e914550d5bff15e8e1db4ea09245ef
Author: xzhan96 <xiaofeng.zhang@intel.com>
Date: Fri Nov 17 01:57:42 2017

[ServiceWorker] Code cleanup for ServiceWorkerDispatcherHost

This function became useless after ServiceWorkerRegistrationObjectHost
mojofication is completed.

BUG= 758151 

Change-Id: I9052d03b7b112ca4e286ed825ad01e02671896be
Reviewed-on: https://chromium-review.googlesource.com/774238
Commit-Queue: Xiaofeng Zhang <xiaofeng.zhang@intel.com>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517245}
[modify] https://crrev.com/e1dc482127e914550d5bff15e8e1db4ea09245ef/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/e1dc482127e914550d5bff15e8e1db4ea09245ef/content/browser/service_worker/service_worker_dispatcher_host.h

Project Member

Comment 24 by bugdroid1@chromium.org, Nov 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0449a04e374ee97a10bfad706bb379e0fce81cf

commit f0449a04e374ee97a10bfad706bb379e0fce81cf
Author: Han Leon <leon.han@intel.com>
Date: Tue Nov 21 02:03:44 2017

[ServiceWorker] Manage SWRegistrationObjectHost instances per SWProviderHost

This CL changes to manage ServiceWorkerRegistrationObjectHost instances
per ServiceWorkerProviderHost with the key registration id, to replace
current implementation which manages them per
ServiceWorkerDispatcherHost (per renderer process) with the key handle
id. Such arrangement aligns with the mapping management
(https://chromium-review.googlesource.com/c/chromium/src/+/748907) in
the renderer process, too.

BUG= 758151 

Change-Id: I1f5c9c68a9884b8fa643ba6d5b14f1f425bb112a
Reviewed-on: https://chromium-review.googlesource.com/773452
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#518057}
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_context_core.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_context_core.h
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_context_unittest.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_registration_object_host.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_registration_object_host.h
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/f0449a04e374ee97a10bfad706bb379e0fce81cf/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 25 by bugdroid1@chromium.org, Nov 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a75a06d75530d6688f98f0def9163f8f905977d0

commit a75a06d75530d6688f98f0def9163f8f905977d0
Author: Han Leon <leon.han@intel.com>
Date: Thu Nov 30 08:52:59 2017

[ServiceWorker] Detach lifetime of SWRegistrationObjectHost from SWProviderHost

This is a follow-up of
https://chromium-review.googlesource.com/c/chromium/src/+/773452.

After this CL:
 - SWRegistrationObjectHost lifetime is strongly bound on its binding
   set, and independent with SWProviderHost lifetime.
 - the mapping in SWProviderHost does not own SWRegistrationObjectHosts
   anymore and has only one functionality: reuse registration object
   host per registration id.
 - The complex lifetime management of WebSWRegistrationImpl brought by
   https://chromium-review.googlesource.com/c/chromium/src/+/732998
   becomes simpler, there is only one destruction scenario now:
     Blink GC removes all references to |this|, |this| closes
     SWRegistrationObjectHost Mojo connection causing the
     content::SWRegistrationObjectHost in the browser process destroys
     (closes SWRegistrationObject Mojo connection), then |this| is
     deleted by the error connection handler.

BUG= 758151 

Change-Id: I21c0f0eef7e93f723e2a37ec02f1c43bf84385bf
Reviewed-on: https://chromium-review.googlesource.com/778360
Commit-Queue: Han Leon <leon.han@intel.com>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520479}
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/service_worker/service_worker_registration_object_host.cc
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/service_worker/service_worker_registration_object_host.h
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/a75a06d75530d6688f98f0def9163f8f905977d0/content/renderer/service_worker/web_service_worker_registration_impl.h

Project Member

Comment 26 by bugdroid1@chromium.org, Dec 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/706ba8b8b44158a734abbfcbfb787d7f118265de

commit 706ba8b8b44158a734abbfcbfb787d7f118265de
Author: Greg Thompson <grt@chromium.org>
Date: Fri Dec 01 19:16:17 2017

Revert "[ServiceWorker] Detach lifetime of SWRegistrationObjectHost from SWProviderHost"

This reverts commit a75a06d75530d6688f98f0def9163f8f905977d0.

Reason for revert: DCHECK in WebServiceWorkerRegistrationImpl::OnConnectionError being hit on Windows debug interactive_ui_tests; see https://crbug.com/790935.

Original change's description:
> [ServiceWorker] Detach lifetime of SWRegistrationObjectHost from SWProviderHost
> 
> This is a follow-up of
> https://chromium-review.googlesource.com/c/chromium/src/+/773452.
> 
> After this CL:
>  - SWRegistrationObjectHost lifetime is strongly bound on its binding
>    set, and independent with SWProviderHost lifetime.
>  - the mapping in SWProviderHost does not own SWRegistrationObjectHosts
>    anymore and has only one functionality: reuse registration object
>    host per registration id.
>  - The complex lifetime management of WebSWRegistrationImpl brought by
>    https://chromium-review.googlesource.com/c/chromium/src/+/732998
>    becomes simpler, there is only one destruction scenario now:
>      Blink GC removes all references to |this|, |this| closes
>      SWRegistrationObjectHost Mojo connection causing the
>      content::SWRegistrationObjectHost in the browser process destroys
>      (closes SWRegistrationObject Mojo connection), then |this| is
>      deleted by the error connection handler.
> 
> BUG= 758151 
> 
> Change-Id: I21c0f0eef7e93f723e2a37ec02f1c43bf84385bf
> Reviewed-on: https://chromium-review.googlesource.com/778360
> Commit-Queue: Han Leon <leon.han@intel.com>
> Reviewed-by: Matt Falkenhagen <falken@chromium.org>
> Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#520479}

TBR=falken@chromium.org,kinuko@chromium.org,rockot@chromium.org,yzshen@chromium.org,shimazu@chromium.org,leon.han@intel.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  758151 
Change-Id: I843abecbab693cae6484477cfadcf0d98e12b4ad
Reviewed-on: https://chromium-review.googlesource.com/803516
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521008}
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/service_worker/service_worker_registration_object_host.cc
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/service_worker/service_worker_registration_object_host.h
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/706ba8b8b44158a734abbfcbfb787d7f118265de/content/renderer/service_worker/web_service_worker_registration_impl.h

Project Member

Comment 27 by bugdroid1@chromium.org, Dec 6 2017

Labels: merge-merged-3282
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/80fdee473465b0dc2131056fa419e268256c54be

commit 80fdee473465b0dc2131056fa419e268256c54be
Author: Matt Falkenhagen <falken@chromium.org>
Date: Wed Dec 06 02:10:06 2017

M64: Revert "[ServiceWorker] Detach lifetime of SWRegistrationObjectHost from SWProviderHost"

This reverts commit a75a06d75530d6688f98f0def9163f8f905977d0.

Reason for revert: DCHECK in WebServiceWorkerRegistrationImpl::OnConnectionError being hit on Windows debug interactive_ui_tests; see https://crbug.com/790935.

Original change's description:
> [ServiceWorker] Detach lifetime of SWRegistrationObjectHost from SWProviderHost
>
> This is a follow-up of
> https://chromium-review.googlesource.com/c/chromium/src/+/773452.
>
> After this CL:
>  - SWRegistrationObjectHost lifetime is strongly bound on its binding
>    set, and independent with SWProviderHost lifetime.
>  - the mapping in SWProviderHost does not own SWRegistrationObjectHosts
>    anymore and has only one functionality: reuse registration object
>    host per registration id.
>  - The complex lifetime management of WebSWRegistrationImpl brought by
>    https://chromium-review.googlesource.com/c/chromium/src/+/732998
>    becomes simpler, there is only one destruction scenario now:
>      Blink GC removes all references to |this|, |this| closes
>      SWRegistrationObjectHost Mojo connection causing the
>      content::SWRegistrationObjectHost in the browser process destroys
>      (closes SWRegistrationObject Mojo connection), then |this| is
>      deleted by the error connection handler.
>
> BUG= 758151 
>
> Change-Id: I21c0f0eef7e93f723e2a37ec02f1c43bf84385bf
> Reviewed-on: https://chromium-review.googlesource.com/778360
> Commit-Queue: Han Leon <leon.han@intel.com>
> Reviewed-by: Matt Falkenhagen <falken@chromium.org>
> Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#520479}

TBR=falken@chromium.org, grt@chromium.org, kinuko@chromium.org, leon.han@intel.com, rockot@chromium.org, shimazu@chromium.org, yzshen@chromium.org


(cherry picked from commit 706ba8b8b44158a734abbfcbfb787d7f118265de)

Bug:  758151 
Change-Id: I843abecbab693cae6484477cfadcf0d98e12b4ad
Reviewed-on: https://chromium-review.googlesource.com/803516
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#521008}
Reviewed-on: https://chromium-review.googlesource.com/809993
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/branch-heads/3282@{#50}
Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840}
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/service_worker/service_worker_registration_object_host.cc
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/service_worker/service_worker_registration_object_host.h
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/80fdee473465b0dc2131056fa419e268256c54be/content/renderer/service_worker/web_service_worker_registration_impl.h

Status: Fixed (was: Started)

Sign in to add a comment