|
|
Description[PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle
BUG=668714, 673771
Committed: https://crrev.com/78a01d19d3321e75787d5d77a0e4e7006d1269c9
Cr-Commit-Position: refs/heads/master@{#438854}
Patch Set 1 #Patch Set 2 : Fix subresource check #
Total comments: 3
Patch Set 3 : add comment #
Dependent Patchsets: Messages
Total messages: 31 (20 generated)
The CQ bit was checked by droger@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
droger@chromium.org changed reviewers: + clamy@chromium.org, mattcary@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Thanks! Lgtm.
droger@chromium.org changed reviewers: + pasko@chromium.org
+pasko as OWNER
pasko: hold on the review. This makes some tests fail (see crbug.com/673771), not sure why the trybots did not catch it.
pasko: hold on the review. This makes some tests fail (see crbug.com/673771), not sure why the trybots did not catch it.
The CQ bit was checked by droger@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== [PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle BUG=668714 ========== to ========== [PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle BUG=668714, 673771 ==========
The CQ bit was checked by droger@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
pasko: this is now ready for review. https://codereview.chromium.org/2576443002/diff/60001/chrome/browser/prerende... File chrome/browser/prerender/prerender_resource_throttle.cc (right): https://codereview.chromium.org/2576443002/diff/60001/chrome/browser/prerende... chrome/browser/prerender/prerender_resource_throttle.cc:174: resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { This is the one line fix for the failing tests. The test here is not intended for the main resource (see the line above, using a subresource-related check). The check for the main resource is done elsewhere (in PrerenderContents and in WillRedirectRequestOnUI below for redirects). The reason why it was failing the test is a bit complex. Here are some explanations for posterity: This was making the test fail because it would cause FINAL_STATUS_UNSUPPORTED_SCHEME when requesting chrome://crash instead of letting it go through and crashing the rendrerer. This was only happening with plz navigate because of an ordering issue: with plz navigate this code is called before the renderer is invoked, whereas with the old flow the renderer is invoked first (and crashes before running this code). Note that chrome://crash is able to go through in the test, because the check for unsupported URLs in PrerenderContents is specifically disabled by TestPrerenderContents. So in real life, prerendering chrome://crash would not crash the prerenderer, it only can do so in the test.
Patchset #2 (id:20001) has been deleted
Patchset #2 (id:40001) has been deleted
lgtm with a comment added referencing the bug https://codereview.chromium.org/2576443002/diff/60001/chrome/browser/prerende... File chrome/browser/prerender/prerender_resource_throttle.cc (right): https://codereview.chromium.org/2576443002/diff/60001/chrome/browser/prerende... chrome/browser/prerender/prerender_resource_throttle.cc:174: resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { On 2016/12/15 09:46:21, droger wrote: > This is the one line fix for the failing tests. > > The test here is not intended for the main resource (see the line above, using a > subresource-related check). > > The check for the main resource is done elsewhere (in PrerenderContents and in > WillRedirectRequestOnUI below for redirects). > > The reason why it was failing the test is a bit complex. Here are some > explanations for posterity: > > This was making the test fail because it would cause > FINAL_STATUS_UNSUPPORTED_SCHEME when requesting chrome://crash instead of > letting it go through and crashing the rendrerer. > > This was only happening with plz navigate because of an ordering issue: with plz > navigate this code is called before the renderer is invoked, whereas with the > old flow the renderer is invoked first (and crashes before running this code). > > Note that chrome://crash is able to go through in the test, because the check > for unsupported URLs in PrerenderContents is specifically disabled by > TestPrerenderContents. > So in real life, prerendering chrome://crash would not crash the prerenderer, it > only can do so in the test. Thanks. That's very informative! Can we put a comment in the body of this branch referencing a the bug with this description? Like: // Destroying the prerender for unsupported scheme only for non-main resource to // allow chrome://crash to actually crash in the *RendererCrash tests instead of // being intercepted here. The unsupported scheme for the main resource is // checked in X. See http://crbug.com/673771.
Thanks for the reviews. https://codereview.chromium.org/2576443002/diff/60001/chrome/browser/prerende... File chrome/browser/prerender/prerender_resource_throttle.cc (right): https://codereview.chromium.org/2576443002/diff/60001/chrome/browser/prerende... chrome/browser/prerender/prerender_resource_throttle.cc:174: resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { On 2016/12/15 15:25:45, pasko wrote: > On 2016/12/15 09:46:21, droger wrote: > > This is the one line fix for the failing tests. > > > > The test here is not intended for the main resource (see the line above, using > a > > subresource-related check). > > > > The check for the main resource is done elsewhere (in PrerenderContents and in > > WillRedirectRequestOnUI below for redirects). > > > > The reason why it was failing the test is a bit complex. Here are some > > explanations for posterity: > > > > This was making the test fail because it would cause > > FINAL_STATUS_UNSUPPORTED_SCHEME when requesting chrome://crash instead of > > letting it go through and crashing the rendrerer. > > > > This was only happening with plz navigate because of an ordering issue: with > plz > > navigate this code is called before the renderer is invoked, whereas with the > > old flow the renderer is invoked first (and crashes before running this code). > > > > Note that chrome://crash is able to go through in the test, because the check > > for unsupported URLs in PrerenderContents is specifically disabled by > > TestPrerenderContents. > > So in real life, prerendering chrome://crash would not crash the prerenderer, > it > > only can do so in the test. > > Thanks. That's very informative! Can we put a comment in the body of this branch > referencing a the bug with this description? > > Like: > // Destroying the prerender for unsupported scheme only for non-main resource to > // allow chrome://crash to actually crash in the *RendererCrash tests instead of > // being intercepted here. The unsupported scheme for the main resource is > // checked in X. See http://crbug.com/673771. Done. Note also that DoesSubresourceURLHaveValidScheme() is only intended to be called on sub resources. If we wanted to check main resources, we would call DoesURLHaveValidScheme(). We don't do it though, for the reasons explained above.
The CQ bit was checked by droger@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from clamy@chromium.org, pasko@chromium.org Link to the patchset: https://codereview.chromium.org/2576443002/#ps80001 (title: "add comment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1481819138551460, "parent_rev": "8569949e29fdd54fd6452095068b39b4a9d9f989", "commit_rev": "213ec51d612cb9ba5267bed88b8adb4b92052c88"}
Message was sent while issue was closed.
Description was changed from ========== [PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle BUG=668714, 673771 ========== to ========== [PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle BUG=668714, 673771 Review-Url: https://codereview.chromium.org/2576443002 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== [PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle BUG=668714, 673771 Review-Url: https://codereview.chromium.org/2576443002 ========== to ========== [PlzNavigate] Use WebContentsGetter in PrerenderResourceThrottle BUG=668714, 673771 Committed: https://crrev.com/78a01d19d3321e75787d5d77a0e4e7006d1269c9 Cr-Commit-Position: refs/heads/master@{#438854} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/78a01d19d3321e75787d5d77a0e4e7006d1269c9 Cr-Commit-Position: refs/heads/master@{#438854} |