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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2532853002: Not for commint: Revert 6ed4d4373c5ce4743850df50f94b867240472033
Patch Set: Created 4 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | 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 e1e3b2cdc192ecbc70c50c2d1d32e989d53a8a58..8e32875dd5ed3b98e7f2a8d65583e4c7d1bfd180 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -659,6 +659,7 @@ void RenderThreadImpl::Init(
InitializeWebKit(resource_task_queue);
// In single process the single process is all there is.
+ notify_webkit_of_modal_loop_ = true;
webkit_shared_timer_suspended_ = false;
widget_count_ = 0;
hidden_widget_count_ = 0;
@@ -1054,15 +1055,21 @@ bool RenderThreadImpl::Send(IPC::Message* msg) {
}
}
+ bool notify_webkit_of_modal_loop = true;
+ std::swap(notify_webkit_of_modal_loop, notify_webkit_of_modal_loop_);
+
if (pumping_events) {
renderer_scheduler_->SuspendTimerQueue();
- WebView::willEnterModalLoop();
+ if (notify_webkit_of_modal_loop)
+ WebView::willEnterModalLoop();
}
bool rv = ChildThreadImpl::Send(msg);
if (pumping_events) {
- WebView::didExitModalLoop();
+ if (notify_webkit_of_modal_loop)
+ WebView::didExitModalLoop();
+
renderer_scheduler_->ResumeTimerQueue();
}
@@ -1711,6 +1718,10 @@ std::unique_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory(
return HostAllocateSharedMemoryBuffer(size);
}
+void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() {
+ notify_webkit_of_modal_loop_ = false;
+}
+
void RenderThreadImpl::OnChannelError() {
// In single-process mode, the renderer can't be restarted after shutdown.
// So, if we get a channel error, crash the whole process right now to get a
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698