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

Unified Diff: components/html_viewer/html_document_application_delegate.cc

Issue 1431573002: Fix hangs in Mandoline page cycler on Linux with --enable-multiprocess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/html_viewer/html_document_application_delegate.cc
diff --git a/components/html_viewer/html_document_application_delegate.cc b/components/html_viewer/html_document_application_delegate.cc
index e57b857126da81a20c3cda62f8476c236be32a22..db537c6ba167214b2237251c847a36bf156ff969 100644
--- a/components/html_viewer/html_document_application_delegate.cc
+++ b/components/html_viewer/html_document_application_delegate.cc
@@ -56,7 +56,8 @@ HTMLDocumentApplicationDelegate::HTMLDocumentApplicationDelegate(
mojo::InterfaceRequest<mojo::Application> request,
mojo::URLResponsePtr response,
GlobalState* global_state,
- scoped_ptr<mojo::AppRefCount> parent_app_refcount)
+ scoped_ptr<mojo::AppRefCount> parent_app_refcount,
+ const mojo::Callback<void()>& destruct_callback)
: app_(this,
request.Pass(),
base::Bind(&HTMLDocumentApplicationDelegate::OnTerminate,
@@ -66,6 +67,7 @@ HTMLDocumentApplicationDelegate::HTMLDocumentApplicationDelegate(
initial_response_(response.Pass()),
global_state_(global_state),
html_factory_(this),
+ destruct_callback_(destruct_callback),
weak_factory_(this) {}
HTMLDocumentApplicationDelegate::~HTMLDocumentApplicationDelegate() {
@@ -76,6 +78,7 @@ HTMLDocumentApplicationDelegate::~HTMLDocumentApplicationDelegate() {
for (HTMLDocument* doc : documents2)
doc->Destroy();
DCHECK(documents2_.empty());
+ destruct_callback_.Run();
}
// Callback from the quit closure. We key off this rather than
« no previous file with comments | « components/html_viewer/html_document_application_delegate.h ('k') | components/html_viewer/layout_test_content_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698