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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 409863002: Suspend shared timers while blockingly closing databases (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 56361e6f136601ff67f90d9971d1b8226c934215..5116fac7442aeafd9f36622a135f8b2669235f42 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -574,8 +574,13 @@ void RenderThreadImpl::Shutdown() {
// Wait for all databases to be closed.
if (webkit_platform_support_) {
+ // WaitForAllDatabasesToClose might run a nested message loop. To avoid
+ // processing timer events while we're already in the process of shutting
+ // down blink, put a ScopePageLoadDeferrer on the stack.
+ WebView::willEnterModalLoop();
michaeln 2014/07/22 20:21:47 lgtm (kinda)
webkit_platform_support_->web_database_observer_impl()->
WaitForAllDatabasesToClose();
+ WebView::didExitModalLoop();
}
// Shutdown in reverse of the initialization order.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698