Guarantee that non-test instances of ResourceRequestInfoImpl are complete.
Specifically, make sure that all such instances have either both a render_frame_id and a render_view_id OR a frame_tree_node_id.
This test also disables WebContents notifications for downloads; since download requests can outlive the WebContents, they aren't really owned by the WebContents (and browser initiated downloads may be initiated before a related WebContents is fully initialized). That change is in this CL because the addition of render_frame_ids to ResourceRequestInfoImpls resulted in notifications being sent (and causing problems) when they had not previously been sent.
BUG=482049
[email protected]
[email protected]
Review URL: https://codereview.chromium.org/1186133004
Cr-Commit-Position: refs/heads/master@{#345150}
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 508a3d6..5f1e6d8 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1699,7 +1699,8 @@
// Note: We should basically send GURL but we use size-limited string instead
// in order to send a larger data url to save a image for <canvas> or <img>.
if (data_url.length() < kMaxLengthOfDataURLString)
- Send(new ViewHostMsg_SaveImageFromDataURL(routing_id_, data_url.utf8()));
+ Send(new ViewHostMsg_SaveImageFromDataURL(
+ routing_id_, GetMainRenderFrame()->GetRoutingID(), data_url.utf8()));
}
bool RenderViewImpl::enumerateChosenDirectory(