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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2707243005: Discard compositor frames from unloaded web content (Closed)
Patch Set: Add default value for source ID in frame metadata Created 3 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 | « content/renderer/gpu/render_widget_compositor.cc ('k') | content/renderer/render_widget.h » ('j') | 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 4af9b671725620814b3f5d10384a881f4c68d83a..20e835f6f1fdfb91c607ee489b1b5ee144608ce5 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3607,6 +3607,7 @@ void RenderFrameImpl::didCommitProvisionalLoad(
// For new page navigations, the browser process needs to be notified of the
// first paint of that page, so it can cancel the timer that waits for it.
if (is_main_frame_ && !navigation_state->WasWithinSamePage()) {
+ GetRenderWidget()->IncrementContentSourceId();
render_view_->QueueMessage(
new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_),
MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
@@ -4879,6 +4880,8 @@ void RenderFrameImpl::SendDidCommitProvisionalLoad(
// corresponding FrameNavigationEntry.
params.page_state = SingleHistoryItemToPageState(item);
+ params.content_source_id = GetRenderWidget()->GetContentSourceId();
+
params.method = request.httpMethod().latin1();
if (params.method == "POST")
params.post_id = ExtractPostId(item);
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698