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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1816563002: PlzNavigate: fix SecurityExploitBrowserTest.MismatchedOriginOnCommit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 8aa0f8356f7efb9222f9ef66df6110559d16f6c5..def3905e17fb9c5d18ffa7c1cc153a3d3a21b38b 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -922,6 +922,8 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
Read(&msg, &iter, &validated_params)) {
bad_message::ReceivedBadMessage(
process, bad_message::RFH_COMMIT_DESERIALIZATION_FAILED);
+ // PlzNavigate: release the stream now that the renderer is going away.
+ stream_handle_.reset();
return;
}
TRACE_EVENT1("navigation", "RenderFrameHostImpl::OnDidCommitProvisionalLoad",
@@ -976,6 +978,8 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
// Kills the process.
bad_message::ReceivedBadMessage(process,
bad_message::RFH_CAN_COMMIT_URL_BLOCKED);
+ // PlzNavigate: release the stream now that the renderer is going away.
+ stream_handle_.reset();
return;
}
@@ -984,6 +988,8 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
if (!CanCommitOrigin(validated_params.origin, validated_params.url)) {
bad_message::ReceivedBadMessage(GetProcess(),
bad_message::RFH_INVALID_ORIGIN_ON_COMMIT);
+ // PlzNavigate: release the stream now that the renderer is going away.
+ stream_handle_.reset();
return;
}
@@ -1008,6 +1014,8 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
validated_params.page_state)) {
bad_message::ReceivedBadMessage(
GetProcess(), bad_message::RFH_CAN_ACCESS_FILES_OF_PAGE_STATE);
+ // PlzNavigate: release the stream now that the renderer is going away.
+ stream_handle_.reset();
nasko 2016/03/18 20:41:14 Instead of putting these in all cases where we kil
clamy 2016/03/22 16:46:55 Actually we already do (in the SiteInstance versio
return;
}
« no previous file with comments | « no previous file | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698