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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2650653006: PlzNavigate; fix UAF in RenderFrameImpl::OnCommitNavigation (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | 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 f32cf8e3df62911f12d8fdaf7fd628643470d11e..e0013d704c2f53f97d89e60a61ae37c6bc81c031 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5175,10 +5175,13 @@ void RenderFrameImpl::OnCommitNavigation(
request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_)
: nullptr);
+ browser_side_navigation_pending_ = false;
+
NavigateInternal(common_params, StartNavigationParams(), request_params,
std::move(stream_override));
- browser_side_navigation_pending_ = false;
+ // Don't add code after this since NavigateInternal may have destroyed this
+ // RenderFrameImpl.
}
// PlzNavigate
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698