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

Unified Diff: content/renderer/render_widget.cc

Issue 2401443002: Fix nested URL blocking needs with PlzNavigate. (Closed)
Patch Set: Created 4 years, 2 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_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index c135f14e277771d4a38bcc09ac48ccd0f120784a..030e4c70720def7b48f5fc14d6a93f07cd539f54 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -32,6 +32,7 @@
#include "content/common/swapped_out_messages.h"
#include "content/common/text_input_state.h"
#include "content/common/view_messages.h"
+#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h"
@@ -326,8 +327,12 @@ RenderWidget* RenderWidget::CreateForFrame(
// routing ID. https://crbug.com/545684
RenderViewImpl* view = RenderViewImpl::FromRoutingID(routing_id);
if (view) {
- view->AttachWebFrameWidget(
- RenderWidget::CreateWebFrameWidget(view->GetWidget(), frame));
+ // With PlzNavigate, the widget could already be created by the speculative
dcheng 2016/10/06 02:34:00 I'm a bit confused about this comment. Could you h
jam 2016/10/06 04:33:48 I could be missing something. The callstack that
jam 2016/10/06 15:09:19 actually, hold off on reviewing this file. I'll wo
alexmos 2016/10/06 22:37:28 The crash that I think you're hitting sounds a lot
jam 2016/10/06 22:54:31 Ah ok, I'll wait for you then. Also, and perhap
alexmos 2016/10/07 01:47:47 Yes, I added that as a repro to issue 651980, and
+ // render frame.
+ if (!IsBrowserSideNavigationEnabled() || !view->GetWebFrameWidget()) {
+ view->AttachWebFrameWidget(
+ RenderWidget::CreateWebFrameWidget(view->GetWidget(), frame));
+ }
return view->GetWidget();
}
scoped_refptr<RenderWidget> widget(

Powered by Google App Engine
This is Rietveld 408576698