| 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
|
|
|