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

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: use infinite loop instead of 10 secs Created 4 years, 8 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 fdba7c596ae48e0f141bcbae111a34a971994741..6bc0bcc62147d839e2837f8be08589759ff67f20 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -662,7 +662,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;
@@ -1007,22 +1006,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();
}
bool rv = ChildThreadImpl::Send(msg);
if (pumping_events) {
- if (notify_webkit_of_modal_loop)
- WebView::didExitModalLoop();
-
+ WebView::didExitModalLoop();
renderer_scheduler_->ResumeTimerQueue();
}
@@ -1677,10 +1669,6 @@ std::unique_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory(
return HostAllocateSharedMemoryBuffer(size);
}
-void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() {
- notify_webkit_of_modal_loop_ = false;
-}
-
bool RenderThreadImpl::OnControlMessageReceived(const IPC::Message& msg) {
base::ObserverListBase<RenderThreadObserver>::Iterator it(&observers_);
RenderThreadObserver* observer;
« 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