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

Unified Diff: content/renderer/render_frame_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: 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
« no previous file with comments | « content/renderer/render_frame_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_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 7a5a438053267852f63b2d2a972d5208805c0668..3d8277d842a81c3db63f2154ef38c972ad329ae9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2129,7 +2129,7 @@ void RenderFrameImpl::OnTextSurroundingSelectionRequest(uint32_t max_length) {
surroundingText.endOffsetInTextContent()));
}
-bool RenderFrameImpl::SendAndRunNestedMessageLoop(IPC::SyncMessage* message) {
+bool RenderFrameImpl::SendSyncMessage(IPC::SyncMessage* message) {
// Before Blink asks us to show an alert (etc.), it takes care of doing the
// equivalent of WebView::willEnterModalLoop. In this case it is particularly
aelias_OOO_until_Jul13 2016/04/29 05:50:38 Could you track down what this "equivalent" is and
Changwan Ryu 2016/04/29 08:44:13 Currently, FlashMessageLoop and PrintWebViewHelper
// important that we do not call willEnterModalLoop as that would defer
@@ -2137,7 +2137,6 @@ bool RenderFrameImpl::SendAndRunNestedMessageLoop(IPC::SyncMessage* message) {
if (RenderThreadImpl::current()) // Will be NULL during unit tests.
RenderThreadImpl::current()->DoNotNotifyWebKitOfModalLoop();
aelias_OOO_until_Jul13 2016/04/29 05:50:38 This is now unneeded, and there is some more code
Changwan Ryu 2016/04/29 08:44:13 Removed notify_webkit_of_modal_loop and related fu
- message->EnableMessagePumping(); // Runs a nested message loop.
return Send(message);
}
@@ -2156,7 +2155,7 @@ bool RenderFrameImpl::RunJavaScriptMessage(JavaScriptMessageType type,
if (!result)
result = &result_temp;
- SendAndRunNestedMessageLoop(new FrameHostMsg_RunJavaScriptMessage(
+ SendSyncMessage(new FrameHostMsg_RunJavaScriptMessage(
routing_id_, message, default_value, frame_url, type, &success, result));
return success;
}
@@ -3635,7 +3634,7 @@ bool RenderFrameImpl::runModalBeforeUnloadDialog(bool is_reload) {
// This is an ignored return value, but is included so we can accept the same
// response as RunJavaScriptMessage.
base::string16 ignored_result;
- SendAndRunNestedMessageLoop(new FrameHostMsg_RunBeforeUnloadConfirm(
+ SendSyncMessage(new FrameHostMsg_RunBeforeUnloadConfirm(
routing_id_, frame_->document().url(), is_reload, &success,
&ignored_result));
return success;
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698