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

Issue 1139673003: Make Mandoline shut down cleanly. (Closed)

Created:
5 years, 7 months ago by jam
Modified:
5 years, 7 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Mandoline shut down cleanly. This involves: -making an app notice when all the objects it vended are gone so that it can terminate -fixing double deletes because of cycles in destruction callbacks -ensuring that child X windows are destructed before the parent BUG=484234

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : rebase #

Patch Set 4 : add helper class #

Patch Set 5 : rebase #

Patch Set 6 : fix crash in surfaces if surfaceimpl outlives the app, and a double delete in browser #

Total comments: 9

Patch Set 7 : make all network objects hold reference too #

Patch Set 8 : ben review comments #

Patch Set 9 : rename ServiceRefCount to AppRefCount #

Patch Set 10 : rename ServiceRefCount to AppRefCount and use weakptr for launcher shutdown #

Patch Set 11 : fix X errors on Linux #

Total comments: 7

Patch Set 12 : use posttask to get to AppLifetimeHelper from AppRefCount #

Patch Set 13 : rebase #

Total comments: 2

Patch Set 14 : add dcheck in AppLifetimeHelper & add errorhandler on ViewManagerClientImpl that was on WindowManag… #

Patch Set 15 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+453 lines, -81 lines) Patch
M components/gles2/command_buffer_driver.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +18 lines, -4 lines 0 comments Download
M components/gles2/command_buffer_driver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +26 lines, -7 lines 0 comments Download
M components/native_viewport/native_viewport_application_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -0 lines 0 comments Download
M components/native_viewport/native_viewport_application_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -1 line 0 comments Download
M components/native_viewport/native_viewport_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -2 lines 0 comments Download
M components/native_viewport/native_viewport_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +13 lines, -7 lines 0 comments Download
M components/native_viewport/onscreen_context_provider.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M components/native_viewport/onscreen_context_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +20 lines, -4 lines 0 comments Download
M components/native_viewport/platform_viewport_x11.cc View 1 2 3 4 3 chunks +0 lines, -5 lines 0 comments Download
M components/surfaces/display_factory_impl.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M components/surfaces/display_factory_impl.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M components/surfaces/display_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -0 lines 0 comments Download
M components/surfaces/surfaces_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -1 line 0 comments Download
M components/surfaces/surfaces_impl.cc View 1 2 3 4 5 3 chunks +6 lines, -2 lines 0 comments Download
M components/surfaces/surfaces_service_application.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -0 lines 0 comments Download
M components/surfaces/surfaces_service_application.cc View 1 2 3 4 5 3 chunks +18 lines, -4 lines 0 comments Download
M components/view_manager/public/cpp/lib/view_manager_init.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
M components/view_manager/public/cpp/view_manager_init.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -2 lines 0 comments Download
M mandoline/services/core_services/core_services_application_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download
M mandoline/ui/browser/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/application/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
A mojo/application/app_lifetime_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +76 lines, -0 lines 0 comments Download
A mojo/application/app_lifetime_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +88 lines, -0 lines 0 comments Download
M mojo/runner/android/native_viewport_application_loader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -1 line 0 comments Download
M mojo/services/network/cookie_store_impl.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M mojo/services/network/cookie_store_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -3 lines 0 comments Download
M mojo/services/network/http_server_impl.h View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -1 line 0 comments Download
M mojo/services/network/http_server_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -3 lines 0 comments Download
M mojo/services/network/network_service_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M mojo/services/network/network_service_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -1 line 0 comments Download
M mojo/services/network/network_service_impl.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -1 line 0 comments Download
M mojo/services/network/network_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +14 lines, -8 lines 0 comments Download
M mojo/services/network/tcp_bound_socket_impl.h View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -1 line 0 comments Download
M mojo/services/network/tcp_bound_socket_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -3 lines 0 comments Download
M mojo/services/network/tcp_connected_socket_impl.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M mojo/services/network/tcp_connected_socket_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M mojo/services/network/tcp_server_socket_impl.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M mojo/services/network/tcp_server_socket_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -3 lines 0 comments Download
M mojo/services/network/udp_socket_impl.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M mojo/services/network/udp_socket_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M mojo/services/network/url_loader_impl.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -1 line 0 comments Download
M mojo/services/network/url_loader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -1 line 0 comments Download
M mojo/services/network/url_loader_impl_apptest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M mojo/services/network/web_socket_impl.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -1 line 0 comments Download
M mojo/services/network/web_socket_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -1 line 0 comments Download
M ui/platform_window/win/win_window.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M ui/platform_window/x11/x11_window.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
jam
5 years, 7 months ago (2015-05-13 19:50:20 UTC) #6
jam
https://codereview.chromium.org/1139673003/diff/170001/components/native_viewport/main.cc File components/native_viewport/main.cc (right): https://codereview.chromium.org/1139673003/diff/170001/components/native_viewport/main.cc#newcode39 components/native_viewport/main.cc:39: event_source_ = ui::PlatformEventSource::CreateDefault(); this is moved to the app ...
5 years, 7 months ago (2015-05-13 19:55:09 UTC) #7
Ben Goodger (Google)
https://codereview.chromium.org/1139673003/diff/170001/components/native_viewport/main.cc File components/native_viewport/main.cc (right): https://codereview.chromium.org/1139673003/diff/170001/components/native_viewport/main.cc#newcode81 components/native_viewport/main.cc:81: mojo::AppLifetimeHelper app_lifetime_helper; app_lifetime_helper_ https://codereview.chromium.org/1139673003/diff/170001/mojo/application/app_lifetime_helper.h File mojo/application/app_lifetime_helper.h (right): https://codereview.chromium.org/1139673003/diff/170001/mojo/application/app_lifetime_helper.h#newcode17 mojo/application/app_lifetime_helper.h:17: ...
5 years, 7 months ago (2015-05-13 20:21:07 UTC) #9
jam
https://codereview.chromium.org/1139673003/diff/170001/components/native_viewport/main.cc File components/native_viewport/main.cc (right): https://codereview.chromium.org/1139673003/diff/170001/components/native_viewport/main.cc#newcode81 components/native_viewport/main.cc:81: mojo::AppLifetimeHelper app_lifetime_helper; On 2015/05/13 20:21:07, Ben Goodger (Google) wrote: ...
5 years, 7 months ago (2015-05-14 14:42:48 UTC) #10
yzshen1
https://codereview.chromium.org/1139673003/diff/260001/mojo/application/app_lifetime_helper.h File mojo/application/app_lifetime_helper.h (right): https://codereview.chromium.org/1139673003/diff/260001/mojo/application/app_lifetime_helper.h#newcode56 mojo/application/app_lifetime_helper.h:56: base::WeakPtrFactory<AppLifetimeHelper> weak_factory_; According to our offline discussion: A service ...
5 years, 7 months ago (2015-05-14 16:16:38 UTC) #12
Elliot Glaysher
lgtm https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/onscreen_context_provider.cc File components/native_viewport/onscreen_context_provider.cc (right): https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/onscreen_context_provider.cc#newcode22 components/native_viewport/onscreen_context_provider.cc:22: for(const auto& driver : command_buffers_) for (
5 years, 7 months ago (2015-05-14 22:53:40 UTC) #13
Ben Goodger (Google)
https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/native_viewport_impl.cc File components/native_viewport/native_viewport_impl.cc (right): https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/native_viewport_impl.cc#newcode160 components/native_viewport/native_viewport_impl.cc:160: delete this; will this ever result in a double ...
5 years, 7 months ago (2015-05-14 22:57:18 UTC) #14
jam
https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/native_viewport_impl.cc File components/native_viewport/native_viewport_impl.cc (right): https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/native_viewport_impl.cc#newcode160 components/native_viewport/native_viewport_impl.cc:160: delete this; On 2015/05/14 22:57:18, Ben Goodger (Google) wrote: ...
5 years, 7 months ago (2015-05-15 02:15:31 UTC) #15
yzshen1
https://codereview.chromium.org/1139673003/diff/300001/mojo/application/app_lifetime_helper.cc File mojo/application/app_lifetime_helper.cc (right): https://codereview.chromium.org/1139673003/diff/300001/mojo/application/app_lifetime_helper.cc#newcode38 mojo/application/app_lifetime_helper.cc:38: base::Bind(&AppLifetimeHelper::AddRef, Is it possible to have races because of ...
5 years, 7 months ago (2015-05-15 06:56:12 UTC) #16
yzshen1
5 years, 7 months ago (2015-05-15 06:56:13 UTC) #17
jam
https://codereview.chromium.org/1139673003/diff/300001/mojo/application/app_lifetime_helper.cc File mojo/application/app_lifetime_helper.cc (right): https://codereview.chromium.org/1139673003/diff/300001/mojo/application/app_lifetime_helper.cc#newcode38 mojo/application/app_lifetime_helper.cc:38: base::Bind(&AppLifetimeHelper::AddRef, On 2015/05/15 06:56:12, yzshen1 wrote: > Is it ...
5 years, 7 months ago (2015-05-15 07:08:45 UTC) #18
yzshen1
On 2015/05/15 07:08:45, jam wrote: > https://codereview.chromium.org/1139673003/diff/300001/mojo/application/app_lifetime_helper.cc > File mojo/application/app_lifetime_helper.cc (right): > > https://codereview.chromium.org/1139673003/diff/300001/mojo/application/app_lifetime_helper.cc#newcode38 > ...
5 years, 7 months ago (2015-05-15 07:17:09 UTC) #19
jam
On 2015/05/15 07:17:09, yzshen1 wrote: > On 2015/05/15 07:08:45, jam wrote: > > > https://codereview.chromium.org/1139673003/diff/300001/mojo/application/app_lifetime_helper.cc ...
5 years, 7 months ago (2015-05-15 15:37:57 UTC) #23
Ben Goodger (Google)
https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/native_viewport_impl.cc File components/native_viewport/native_viewport_impl.cc (right): https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/native_viewport_impl.cc#newcode160 components/native_viewport/native_viewport_impl.cc:160: delete this; On 2015/05/15 02:15:31, jam wrote: > On ...
5 years, 7 months ago (2015-05-15 16:19:07 UTC) #24
jam
On 2015/05/15 16:19:07, Ben Goodger (Google) wrote: > https://codereview.chromium.org/1139673003/diff/260001/components/native_viewport/native_viewport_impl.cc > File components/native_viewport/native_viewport_impl.cc (right): > > ...
5 years, 7 months ago (2015-05-18 15:19:15 UTC) #25
sky
view_manager_init LGTM
5 years, 7 months ago (2015-05-18 15:55:08 UTC) #26
jam
5 years, 7 months ago (2015-05-22 20:34:35 UTC) #27
Closing this since I landed all this patch in smaller pieces.

Powered by Google App Engine
This is Rietveld 408576698