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

Issue 734210 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Feature
Proj-Servicification


Sign in to add a comment

Associate an InterfaceProvider with every WorkerGlobalScope

Project Member Reported by reillyg@chromium.org, Jun 16 2017

Issue description

This issue tracks the work necessary to provide workers of all types with an InterfaceProvider so that they may request interfaces for their particular execution context instead of from the global process interface registry.

So far I have determined the following steps for this task:

1. Replace usage of Process::GetInterfaceProvider() with a new WorkerThread::GetInterfaceProvider() that is simply a wrapper around the existing function.

2. Change the object returned from this function from a blink::InterfaceProvider to a service_manager::InterfaceProvider.

3. Enhance MojoInterfaceInterceptor so that it is available from workers and intercepts interface requests made to the WorkerThread's interface provider.

4. Update the browser side code so that it is aware of which worker an interface request came from.

 
Blocking: 726943
Cc: roc...@chromium.org yzshen@chromium.org
Components: Blink>Workers
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 24 2017

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

commit 70467755f29529316df59d710d4a0cceffe9647a
Author: Reilly Grant <reillyg@chromium.org>
Date: Sat Jun 24 02:42:46 2017

Port Shape Detection to use WorkerThread::GetInterfaceProvider()

This change updates Shape Detection to get the interface provider from
either the LocalFrame or WorkerThread in which it is running. This
creates some duplication which will be cleaned up when Mojo interface
registration is centralized.

Bug:  734210 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ifb44efac2273161e322ea2df2b3c4abaa054a9ce
Reviewed-on: https://chromium-review.googlesource.com/541896
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482124}
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/content/test/data/media/shape_detection_test.html
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.idl
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/DEPS
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.h
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/FaceDetector.idl
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/TextDetector.h
[modify] https://crrev.com/70467755f29529316df59d710d4a0cceffe9647a/third_party/WebKit/Source/modules/shapedetection/TextDetector.idl

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 27 2017

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

commit 74bfe0ebb532a2db1aab449c7514b1b31089d07b
Author: Reilly Grant <reillyg@chromium.org>
Date: Tue Jun 27 21:47:41 2017

Move ImageCapture interface to the per-frame registry

Platform::GetInterfaceProvider will soon be deprecated so this change
moves the ImageCapture interface registration to the registry associated
with a frame.

Bug:  734210 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Ie3f56153e170757d4ccf120692e6bbc2705a2e2f
Reviewed-on: https://chromium-review.googlesource.com/549012
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482758}
[modify] https://crrev.com/74bfe0ebb532a2db1aab449c7514b1b31089d07b/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/74bfe0ebb532a2db1aab449c7514b1b31089d07b/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/74bfe0ebb532a2db1aab449c7514b1b31089d07b/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/74bfe0ebb532a2db1aab449c7514b1b31089d07b/third_party/WebKit/LayoutTests/imagecapture/resources/mock-imagecapture.js
[modify] https://crrev.com/74bfe0ebb532a2db1aab449c7514b1b31089d07b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 1 2017

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

commit 51a64d9d83edf4aa46f774f6bcd23f0271aa5366
Author: Reilly Grant <reillyg@chromium.org>
Date: Sat Jul 01 14:39:44 2017

Use per-frame or per-worker interface provider in WebSockets

This changes updates the WebSocket implementation so that when a
WebSocket is opened from a worker the per-worker interface provider
provided by WorkerThread is used. WebSocketHandle has been refactored so
that the pipe can be opened from the correct thread.

Bug:  734210 
Change-Id: Ieb9af218fe9b23011526f3da585cf6f6cf4660d1
Reviewed-on: https://chromium-review.googlesource.com/556464
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483910}
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.h
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
[modify] https://crrev.com/51a64d9d83edf4aa46f774f6bcd23f0271aa5366/third_party/WebKit/Source/platform/CrossThreadCopier.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 1 2017

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

commit 03322108cedb2b380926f58c507157828c6db4f2
Author: Reilly Grant <reillyg@chromium.org>
Date: Sat Jul 01 16:28:18 2017

Port PaymentManager to frame and worker specific interface providers

This change updates PaymentManager to request its Mojo pipe from either
the frame-specific or worker-specific interface provider. Since the
process-global interface provider is no longer used for requests from
frames (the worker-specific interface provider still forwards to the
process global one) the PaymentManager interface registration is added
to RenderFrameHostImpl.

Bug:  734210 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I438c2ffcc79937ddbe7f486180195e0ba84cfd52
Reviewed-on: https://chromium-review.googlesource.com/549229
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483912}
[modify] https://crrev.com/03322108cedb2b380926f58c507157828c6db4f2/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/03322108cedb2b380926f58c507157828c6db4f2/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/03322108cedb2b380926f58c507157828c6db4f2/third_party/WebKit/Source/modules/payments/PaymentManager.cpp

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 6 2017

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

commit ec8a59378bf5e15360c3728e35ab5b57ca8fd495
Author: Reilly Grant <reillyg@chromium.org>
Date: Thu Jul 06 00:52:01 2017

Expose the MojoJS and MojoJSTest bindings in Workers

This change makes the Mojo JavaScript bindings including the testing
interface available in Worker contexts. Each WorkerThread is given a
service_manager::InterfaceProvider so that MojoInterfaceInterceptor
can intercept requests from particular workers.

The Mojo JS bindings have been updated so that they may be used in a
Worker as long as autoloading is not used because relative script
imports are not possible (without ECMAScript modules).

Bug:  734210 
Change-Id: Ib4fa81cf98e2693b286c98b35cd3dbe50cc6abb8
Reviewed-on: https://chromium-review.googlesource.com/541999
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Yuzhu Shen <yzshen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484428}
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/mojo/public/js/new_bindings/base.js
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[add] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/mojo/bind-intercepted-interface-in-worker.html
[add] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/mojo/detached-frame.html
[add] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/mojo/resources/bind-intercepted-interface-in-worker.js
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/BUILD.gn
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/events/EventTargetFactory.json5
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/BUILD.gn
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/Mojo.cpp
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/Mojo.idl
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/MojoHandle.idl
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/MojoWatcher.idl
[rename] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/test/MojoInterfaceInterceptor.cpp
[rename] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/test/MojoInterfaceInterceptor.h
[rename] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/test/MojoInterfaceInterceptor.idl
[rename] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/test/MojoInterfaceRequestEvent.cpp
[rename] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/test/MojoInterfaceRequestEvent.h
[rename] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/test/MojoInterfaceRequestEvent.idl
[rename] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/mojo/test/MojoInterfaceRequestEventInit.idl
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/workers/WorkerThread.cpp
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/core/workers/WorkerThread.h
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/modules/payments/PaymentManager.cpp
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/modules/permissions/PermissionUtils.cpp
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
[modify] https://crrev.com/ec8a59378bf5e15360c3728e35ab5b57ca8fd495/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 7 2017

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

commit 8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba
Author: Reilly Grant <reillyg@chromium.org>
Date: Fri Jul 07 16:35:06 2017

Switch BudgetService to frame and worker specific interface providers

This change updates the Budget API to request the BudgetService from
either the frame-specific or worker-specific interface provider
depending on the execution context it is called from.

Bug:  734210 
Change-Id: Ic9be8f202e2606f00f602502e0b6dba94f4243d9
Reviewed-on: https://chromium-review.googlesource.com/552840
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484952}
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/Source/modules/budget/BudgetService.cpp
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/Source/modules/budget/BudgetService.h
[add] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/Source/modules/budget/DEPS
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.cpp
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h
[modify] https://crrev.com/8e5c85c8096edb9b2fbf6c2837f96f0d68a719ba/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.idl

Comment 9 by mek@chromium.org, Jul 10 2017

Blocking: 740585
Blocking: 753936
After reillyg's CLs, it looks like there aren't many calls to Platform::GetInterfaceProvider():


$ git gs "Current()->GetInterfaceProvider()"
Source/core/workers/WorkerThread.cpp:77:  Platform::Current()->GetInterfaceProvider()->GetInterface(name.c_str(),
Source/modules/background_fetch/BackgroundFetchBridge.cpp:113:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/modules/background_sync/SyncManager.cpp:72:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/modules/broadcastchannel/BroadcastChannel.cpp:29:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/modules/notifications/NotificationManager.cpp:51:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/platform/blob/BlobData.cpp:275:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/platform/blob/BlobData.cpp:293:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/platform/blob/BlobData.cpp:407:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp:47:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/platform/graphics/SurfaceLayerBridge.cpp:69:  Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/platform/network/mime/MIMETypeRegistry.cpp:27:    Platform::Current()->GetInterfaceProvider()->GetInterface(
Source/platform/text/hyphenation/HyphenationMinikin.cpp:23:  Platform::Current()->GetInterfaceProvider()->GetInterface(

I'm going to try going through these and changing the remaining worker related ones to use service_manager::InterfaceProvider.
Project Member

Comment 12 by bugdroid1@chromium.org, Oct 11 2017

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

commit d80115000b019541e58a4d5ac4433870b22b247e
Author: Sam McNally <sammc@chromium.org>
Date: Wed Oct 11 08:53:34 2017

Add an InterfaceProvider accessor to ExecutionContext.

Add ExecutionContext::GetInterfaceProvider() and implement it in
WorkerGlobalScope and Document (forwarding to LocalFrame's
GetInterfaceProvider()). The InterfaceProviderPtrInfo in
GlobalScopeCreationParams will be initialized with connections to the
implementations in the browser in follow-up changes.

Bug:  734210 
Change-Id: I61119301ee2af5ce37da27886f7e0b30a0ac9e2b
Reviewed-on: https://chromium-review.googlesource.com/711335
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507929}
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/DEPS
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/dom/ExecutionContext.h
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/workers/GlobalScopeCreationParams.cpp
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/workers/GlobalScopeCreationParams.h
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
[modify] https://crrev.com/d80115000b019541e58a4d5ac4433870b22b247e/third_party/WebKit/Source/core/workers/WorkerGlobalScope.h

Project Member

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

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

commit a748ba2c8de604974d6f042ad3ca17f2babfaf77
Author: Sam McNally <sammc@chromium.org>
Date: Fri Oct 13 07:15:32 2017

Add an InterfaceProvider from shared workers to SharedWorkerHost.

Add an InterfaceProvider to SharedWorkerFactory::CreateSharedWorker().
Bind the impl end of the InterfaceProvider to the SharedWorkerHost and
bind the client end to the WorkerGlobalScope InterfaceProvider when
creating a SharedWorkerGlobalScope.

Bug:  734210 
Change-Id: I12001f6da4126095debcb5d5788f18c28d7509c6
Reviewed-on: https://chromium-review.googlesource.com/696403
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508631}
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/browser/shared_worker/shared_worker_host.cc
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/browser/shared_worker/shared_worker_host.h
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/browser/shared_worker/shared_worker_service_impl_unittest.cc
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/common/shared_worker/shared_worker_factory.mojom
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/renderer/shared_worker/embedded_shared_worker_stub.cc
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/renderer/shared_worker/embedded_shared_worker_stub.h
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/renderer/shared_worker/shared_worker_factory_impl.cc
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/content/renderer/shared_worker/shared_worker_factory_impl.h
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.h
[modify] https://crrev.com/a748ba2c8de604974d6f042ad3ca17f2babfaf77/third_party/WebKit/public/web/WebSharedWorker.h

Project Member

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

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

commit d8bd2dffcb7e6bac3f21551876d45fd25b6588dc
Author: Sam McNally <sammc@chromium.org>
Date: Sun Oct 15 09:57:46 2017

Add an InterfaceProvider from service workers to ServiceWorkerProviderHost.

Add an InterfaceProvider to the ServiceWorkerProviderInfoForStartWorker
struct passed to EmbedderWorkerInstanceClient::StartWorker().
Bind the impl ends of the InterfaceProvider to ServiceWorkerProviderHost
instances hosting service workers and bind the client ends to
WorkerGlobalScope InterfaceProviders when creating
ServiceWorkerGlobalScopes.

Bug:  734210 
Change-Id: Iec1d354dbe0a83b72e385934d8c94a392cfafa4a
Reviewed-on: https://chromium-review.googlesource.com/706745
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508956}
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/browser/service_worker/embedded_worker_instance_unittest.cc
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/browser/service_worker/service_worker_version_unittest.cc
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/common/service_worker/service_worker_provider.mojom
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/renderer/service_worker/embedded_worker_instance_client_impl.cc
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/content/renderer/service_worker/embedded_worker_instance_client_impl.h
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/third_party/WebKit/Source/modules/DEPS
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.h
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/third_party/WebKit/Source/modules/serviceworkers/WebEmbeddedWorkerImplTest.cpp
[modify] https://crrev.com/d8bd2dffcb7e6bac3f21551876d45fd25b6588dc/third_party/WebKit/public/web/WebEmbeddedWorker.h

Cc: reillyg@chromium.org
Owner: sa...@chromium.org
Officially assigning this to Sam since he's been doing so much work to make this plan come to fruition. Thank you!

Comment 16 by sa...@chromium.org, Oct 16 2017

Summary: Associate an InterfaceProvider with every WorkerGlobalScope (was: Associate an InterfaceProvider with every WorkerThread)
Project Member

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

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

commit ee8cceda6a09b5ec765566f4e9eb1a01db5b6380
Author: Sam McNally <sammc@chromium.org>
Date: Wed Oct 18 12:00:15 2017

Connect dedicated workers to a DedicatedWorkerHost.

Add a DedicatedWorkerHost and use it to receive interface requests from
dedicated workers. Create DedicatedWorkerFactory mojo interface for
frames to use when creating dedicated workers.

Bug:  734210 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I6a65798e9f59efbb4683c0b67d24bc67c43a96d5
Reviewed-on: https://chromium-review.googlesource.com/696501
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509748}
[modify] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/browser/BUILD.gn
[modify] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/browser/DEPS
[add] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/browser/dedicated_worker/OWNERS
[add] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/browser/dedicated_worker/README.md
[add] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/browser/dedicated_worker/dedicated_worker_host.cc
[add] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/browser/dedicated_worker/dedicated_worker_host.h
[modify] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/third_party/WebKit/Source/core/workers/DedicatedWorkerMessagingProxy.cpp
[modify] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/ee8cceda6a09b5ec765566f4e9eb1a01db5b6380/third_party/WebKit/public/platform/dedicated_worker_factory.mojom

Project Member

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

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

commit b37168aeedf74c6d52b54c2630650a748b4bd61e
Author: Sam McNally <sammc@chromium.org>
Date: Tue Oct 24 06:39:20 2017

Add InterfaceProviderSpecs for web workers.

For each worker host, when providing the worker with an
InterfaceProvider, request the service_manager::Connector filter the
interfaces. Add stub InterfaceProviderSpecs for each worker type.

Add a helper function FilterRendererExposedInterfaces() to avoid
copy-pasting the code looking-up the Connector for a RenderProcessHost
ID and use it to filter interface requests to worker and frame hosts.

Bug:  734210 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I3eb803ffeafaef6848d7a9d8fdb9cbccf701cc2e
Reviewed-on: https://chromium-review.googlesource.com/725062
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511047}
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/browser/BUILD.gn
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/browser/dedicated_worker/dedicated_worker_host.cc
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/browser/frame_host/render_frame_host_impl.cc
[add] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/browser/interface_provider_filtering.cc
[add] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/browser/interface_provider_filtering.h
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/browser/shared_worker/shared_worker_host.cc
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/common/service_worker/service_worker_provider.mojom
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/common/shared_worker/shared_worker_factory.mojom
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/content/public/app/mojo/content_renderer_manifest.json
[modify] https://crrev.com/b37168aeedf74c6d52b54c2630650a748b4bd61e/third_party/WebKit/public/platform/dedicated_worker_factory.mojom

Comment 19 by sa...@chromium.org, Oct 30 2017

Blocking: 779444
Project Member

Comment 20 by bugdroid1@chromium.org, Oct 31 2017

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

commit faf9a403107325c056c4588bc227cc541b8621f2
Author: Sam McNally <sammc@chromium.org>
Date: Tue Oct 31 03:06:31 2017

Add a shared BinderRegistry for web workers.

Add content::BindWorkerInterface(), a function to bind an interface
requested by a web worker. BindWorkerInterface() forwards to a
singleton WorkerInterfaceBinders, responsible for registering interface
binders on and dispatching interface requests using a
BinderRegistryWithArgs<RenderProcessHost*, const url::Origin&>. These
BinderRegistryWithArgs arg types are temporary until
 https://crbug.com/775792  determines the appropriate longer-term arg
types.

To support worker-exposed interfaces implemented by the embedder, add
ContentBrowserClient::BindInterfaceRequestFromWorker(). Forward requests
not handled at the content layer to BindInterfaceRequestFromWorker().

Migrate {Barcode,Face,Text}Detector, BudgetService and Mojo bindings to
use the worker InterfaceProviders. Update MojoInterfaceInterceptor to
intercept interface requests sent on the worker InterfaceProviders
instead of the process-wide connector. These APIs rely on
MojoInterfaceInterceptor for testing so are migrated together.

Bug:  734210 ,  775792 
Change-Id: I7add53ac091f5c5bfcdeb67c935fb138e0b99173
Reviewed-on: https://chromium-review.googlesource.com/725202
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512727}
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/budget_service/budget_service_impl.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/budget_service/budget_service_impl.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/chrome/browser/chrome_content_browser_manifest_overlay.json
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/BUILD.gn
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/dedicated_worker/dedicated_worker_host.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/shared_worker/shared_worker_host.cc
[add] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/worker_interface_binders.cc
[add] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/browser/worker_interface_binders.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/content/public/browser/content_browser_client.h
[delete] https://crrev.com/a61604478fbacd5d6bf7b7c600578d5970b95417/third_party/WebKit/LayoutTests/mojo/intercept-interface-for-worker.html
[delete] https://crrev.com/a61604478fbacd5d6bf7b7c600578d5970b95417/third_party/WebKit/LayoutTests/mojo/resources/expect-test-reply.js
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/core/mojo/Mojo.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/core/mojo/test/MojoInterfaceInterceptor.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/NavigatorBudget.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/NavigatorBudget.h
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/NavigatorBudget.idl
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/shapedetection/FaceDetector.cpp
[modify] https://crrev.com/faf9a403107325c056c4588bc227cc541b8621f2/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp

Project Member

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

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

commit 6f337bcce985001d4460edcd4f9f8ea59b269123
Author: Sam McNally <sammc@chromium.org>
Date: Wed Nov 01 02:40:21 2017

Remove the WorkerThread InterfaceProvider.

Migrate the remaining interfaces accessed via
WorkerThread::GetInterfaceProvider() to use
ExecutionContext::GetInterfaceProvider():
- PaymentManager
- PermissionService
- WebSocket

Bug:  734210 
Change-Id: Ib33c8783bbb490bd4bda5dd31da2a72ab218d03b
Reviewed-on: https://chromium-review.googlesource.com/743102
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513053}
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/content/browser/renderer_host/render_process_host_impl.h
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/content/browser/worker_interface_binders.cc
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/core/workers/WorkerThread.cpp
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/core/workers/WorkerThread.h
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/cookie_store/GlobalCookieStore.cpp
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/payments/PaymentManager.cpp
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/permissions/PermissionUtils.cpp
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/permissions/PermissionUtils.h
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/permissions/Permissions.cpp
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/permissions/Permissions.h
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/quota/StorageManager.cpp
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/quota/StorageManager.h
[modify] https://crrev.com/6f337bcce985001d4460edcd4f9f8ea59b269123/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp

Status: Fixed (was: Started)
Workers now have InterfaceProvider connections to worker hosts in the browser. Issue 779444 tracks the migration to use them.
Components: Internals>Network>Service
Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.
Components: Internals>Services>Storage
Setting Internals>Services>Storage to all children of issue 611935

Sign in to add a comment