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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1931793002: Stop using nested message loop for alert() and other JS dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated comment Created 4 years, 7 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
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index c81e108be2fee15ac2e233e91f3a4035618ed098..4582ad8d8ad84960f1d75c8e14826aec8091c579 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -614,7 +614,6 @@ 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;
@@ -959,22 +958,15 @@ bool RenderThreadImpl::Send(IPC::Message* msg) {
}
}
- bool notify_webkit_of_modal_loop = true; // default value
- std::swap(notify_webkit_of_modal_loop, notify_webkit_of_modal_loop_);
-
if (pumping_events) {
renderer_scheduler_->SuspendTimerQueue();
-
- if (notify_webkit_of_modal_loop)
- WebView::willEnterModalLoop();
+ WebView::willEnterModalLoop();
no sievers 2016/05/18 20:11:24 ...and related to that: why do we still need to te
Changwan Ryu 2016/05/19 00:44:56 PrintWebViewHelper and FlashMessageLoop may need t
Lei Zhang 2016/05/19 00:50:28 window.print() is still a thing and it is synchron
Changwan Ryu 2016/05/19 01:00:31 Thanks for the correction. I mean alert(), beforeu
}
bool rv = ChildThreadImpl::Send(msg);
if (pumping_events) {
- if (notify_webkit_of_modal_loop)
- WebView::didExitModalLoop();
-
+ WebView::didExitModalLoop();
renderer_scheduler_->ResumeTimerQueue();
}
@@ -1620,10 +1612,6 @@ 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
« content/renderer/render_frame_impl.h ('K') | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698