Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Issue 2633053002: Remove the MessageLoop::DestructionObserver from mojo bindings. (Closed)

Created:
3 years, 11 months ago by Sam McNally
Modified:
3 years, 10 months ago
CC:
Aaron Boodman, abarth-chromium, anandc+watch-blimp_chromium.org, android-webview-reviews_chromium.org, bgoldman+watch-blimp_chromium.org, blink-worker-reviews_chromium.org, chfremer+watch_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dtrainor+watch-blimp_chromium.org, feature-media-reviews_chromium.org, gcasto+watch-blimp_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, khushalsagar+watch-blimp_chromium.org, kinuko+serviceworker, kinuko+watch, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, mcasas+watch+vc_chromium.org, michaeln, mlamouri+watch-content_chromium.org, nhiroki, nyquist+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, scf+watch-blimp_chromium.org, serviceworker-reviews, shaktisahu+watch-blimp_chromium.org, shimazu+serviceworker_chromium.org, sriramsr+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org, tzik, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove the MessageLoop::DestructionObserver from mojo bindings. Mojo connection error handlers running during browser shutdown have been a cause of several crashes due to the error handlers running after their dependency (e.g. a KeyedService or a RenderProcessHost) has shut down. From a brief survey of users of StrongBinding, none appear to perform any tear-down that is necessary during process shutdown. Further, the vast majority of threads (and thread pools) run for close to the life of the process, so any these connection error handlers will generally only be triggered during shutdown. Thus, in production this causes slower, less-stable browser shutdowns without any real benefit. Additionally, SequencedTaskRunner does not have a MessageLoop and is not expected to support a similar destruction observer. Thus, to improve compatibility with future support for running mojo bindings on SequencedTaskRunners, this removes MessageLoop::DestructionObserver from mojo bindings. BUG=678155 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2633053002 Cr-Commit-Position: refs/heads/master@{#447085} Committed: https://chromium.googlesource.com/chromium/src/+/14e09ca425d1ee9572f69d29cdd00cff1a1b2bfc

Patch Set 1 : #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : rebase #

Patch Set 5 : #

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -67 lines) Patch
M android_webview/native/aw_contents_client_bridge.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ash/common/cast_config_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M ash/common/media_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_observers.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/battery_status/battery_monitor_integration_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/compositor_external_begin_frame_source.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/render_media_log_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/presentation/presentation_dispatcher.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/device_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M device/usb/mojo/device_impl_unittest.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/ipc/service/gpu_channel_manager.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc_test_base.h View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/android/system/watcher_impl.cc View 1 2 3 4 5 chunks +12 lines, -38 lines 0 comments Download
M mojo/public/cpp/bindings/interface_endpoint_client.h View 4 chunks +1 line, -9 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_endpoint_client.cc View 2 chunks +0 lines, -17 lines 0 comments Download
M mojo/public/cpp/bindings/strong_associated_binding.h View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/strong_binding.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M services/service_manager/public/cpp/lib/interface_registry.cc View 1 chunk +1 line, -0 lines 0 comments Download
M services/service_manager/standalone/context.cc View 1 chunk +1 line, -0 lines 0 comments Download
M services/video_capture/device_factory_media_to_mojo_adapter.cc View 1 chunk +1 line, -0 lines 0 comments Download
M services/video_capture/test/mock_device_test.h View 1 chunk +4 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 127 (116 generated)
Sam McNally
3 years, 11 months ago (2017-01-25 10:33:33 UTC) #101
yzshen1
On 2017/01/25 10:33:33, Sam McNally wrote: Overall this looks good. Please add comments to Strong[Associated]Binding ...
3 years, 11 months ago (2017-01-25 17:13:52 UTC) #102
yzshen1
On 2017/01/25 17:13:52, yzshen1 wrote: > On 2017/01/25 10:33:33, Sam McNally wrote: > > Overall ...
3 years, 11 months ago (2017-01-25 17:27:05 UTC) #103
Ken Rockot(use gerrit already)
LGTM!
3 years, 11 months ago (2017-01-26 23:51:19 UTC) #106
yzshen1
LGTM with one nit. https://codereview.chromium.org/2633053002/diff/360001/mojo/public/cpp/bindings/strong_associated_binding.h File mojo/public/cpp/bindings/strong_associated_binding.h (right): https://codereview.chromium.org/2633053002/diff/360001/mojo/public/cpp/bindings/strong_associated_binding.h#newcode33 mojo/public/cpp/bindings/strong_associated_binding.h:33: // task runner that a ...
3 years, 11 months ago (2017-01-26 23:58:20 UTC) #107
Sam McNally
+jbauman for //gpu and //content/*/gpu (in particular the change to content::BrowserGpuChannelHostFactory and its use from ...
3 years, 11 months ago (2017-01-27 04:54:20 UTC) #111
jbauman
gpu stuff lgtm
3 years, 10 months ago (2017-01-27 23:01:38 UTC) #114
Sam McNally
+jam for //content other than //content/*/gpu, //chrome, //ash and //android_webview
3 years, 10 months ago (2017-01-30 01:46:51 UTC) #120
jam
lgtm
3 years, 10 months ago (2017-01-30 18:02:25 UTC) #121
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2633053002/440001
3 years, 10 months ago (2017-01-30 21:59:37 UTC) #124
commit-bot: I haz the power
3 years, 10 months ago (2017-01-30 22:08:18 UTC) #127
Message was sent while issue was closed.
Committed patchset #6 (id:440001) as
https://chromium.googlesource.com/chromium/src/+/14e09ca425d1ee9572f69d29cdd0...

Powered by Google App Engine
This is Rietveld 408576698