Android Webview: Subframe back navigation crashes with loadDataForBaseURL |
||||||||
Issue descriptionChrome Version: 63.0.3223.0 OS: Android Webview What steps will reproduce the problem? (1) Load a page with an iframe via loadDataWithBaseURL (2) Do a same-document navigation in a subframe (3) Go back What is the expected result? The iframe should correctly go back in the same document. What happens instead? We crash on an origin check. boliu@ discovered that we're passing down the NavigationEntry's base URL and data string for subframe history navigations, even though those fields are only meant for main frames. Test from boliu@ (thanks!): https://chromium-review.googlesource.com/c/chromium/src/+/680017
,
Sep 26 2017
Also, it looks like this might not be specific to same-document navigations. (I get a similar test failure for cross-document subframe navigations.)
boliu@: You mentioned you were seeing it fail on a DCHECK and an origin CHECK? I'm seeing a different failure (i.e., the else branch of the DataURL::Parse condition):
CHECK(false) << "Invalid URL passed: "
<< params.url.possibly_invalid_spec();
I'll look closer tomorrow, but it might help if you let me know which line you were seeing fail in practice if it was different. Thanks!
,
Sep 26 2017
Initial CL here: https://chromium-review.googlesource.com/c/chromium/src/+/683341
,
Sep 26 2017
Yes, loadDataWithBaseURL only applies to the main frame. I was using a few releases back, and it was failing on this check: https://cs.chromium.org/chromium/src/content/renderer/render_frame_impl.cc?rcl=37ad670b857bd0c1cef752bba9d2c43d995d5bfc&l=5119 url was the base url of the top level loadDataWithBaseURL frame, and origin was the url of the subframe
,
Sep 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c44784177e34421934fe40e7218bb350bb466d66 commit c44784177e34421934fe40e7218bb350bb466d66 Author: Charles Reis <creis@chromium.org> Date: Tue Sep 26 07:20:57 2017 Don't use base URL and history URL for subframe navigations. BUG= 768575 TEST=See bug for repro steps Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation Change-Id: I0c64d13dcea6a13b622ec250d55327972fe77390 Reviewed-on: https://chromium-review.googlesource.com/683341 Commit-Queue: Charlie Reis (catching up) <creis@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#504302} [modify] https://crrev.com/c44784177e34421934fe40e7218bb350bb466d66/content/browser/frame_host/navigation_controller_impl_browsertest.cc [modify] https://crrev.com/c44784177e34421934fe40e7218bb350bb466d66/content/renderer/render_frame_impl.cc
,
Sep 26 2017
The fix landed in r504302 (should be in tomorrow's canary), and I filed issue 769048 for the followup work. boliu@: How are merges handled for Android Webview issues? I don't think this bug affects other platforms, but I imagine we'd want to merge it anyway. Is there a way we can verify the fix before requesting merge?
,
Sep 26 2017
Webview is built from directly chromium source, so merge is done exactly same way as chrome, crbug merge labels, git drover or whatever your favourite merge steps you want to use I verified local trunk no longer crashes.
,
Sep 26 2017
Great, that simplifies things. I'll let it bake on Canary for a day and then request merge to M62.
,
Sep 28 2017
This has baked on Canary since 63.0.3225.0 and the Android Webview fix was verified in comment 7, so I'm requesting to merge to M62. For context on severity and why it's important to merge, please see b/34220171. This will fix the following crash: https://crash.corp.google.com/browse?q=product.name%3D%27AndroidWebView%27%20AND%20custom_data.ChromeCrashProto.magic_signature_1.name%3D%27content%3A%3ARenderFrameImpl%3A%3ALoadDataURL%27&sql_dialect=dremelsql&ignore_case=false&enable_rewrite=true&omit_field_name=&omit_field_value=&omit_field_opt=%3D#-property-selector,productversion:1000
,
Sep 28 2017
This bug requires manual review: M62 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 28 2017
What is the risk associated with merging this bug into M62 at this time? Since this is not a regression in M62, Do we need more time for this fix to bake in M63 Dev and Beta before pushing it?
,
Sep 28 2017
This is a very targeted fix which should be a safe merge, since subframes are never meant to use loadDataWithBaseURL functionality. The reason for the merge is that it's causing a lot of crashes in a popular use case, and has been for too long (see b/34220171). That bug took a long time to triage and find the cause, but I think it is important to get the fix out as soon as possible.
,
Sep 28 2017
Sounds good! Merge approved! Please make sure to verify the fix after merging it into M62 branch.
,
Sep 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d09b1946852e160bd8c7d9c689bef9ab251cd80c commit d09b1946852e160bd8c7d9c689bef9ab251cd80c Author: Charles Reis <creis@chromium.org> Date: Fri Sep 29 00:38:52 2017 Don't use base URL and history URL for subframe navigations. BUG= 768575 TEST=See bug for repro steps TBR=creis@chromium.org (cherry picked from commit c44784177e34421934fe40e7218bb350bb466d66) Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation Change-Id: I0c64d13dcea6a13b622ec250d55327972fe77390 Reviewed-on: https://chromium-review.googlesource.com/683341 Commit-Queue: Charlie Reis (catching up) <creis@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#504302} Reviewed-on: https://chromium-review.googlesource.com/691184 Reviewed-by: Charlie Reis <creis@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#498} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/d09b1946852e160bd8c7d9c689bef9ab251cd80c/content/browser/frame_host/navigation_controller_impl_browsertest.cc [modify] https://crrev.com/d09b1946852e160bd8c7d9c689bef9ab251cd80c/content/renderer/render_frame_impl.cc
,
Oct 4 2017
Issue verified on Monochrome/Webview: 62.0.3202.45, tested on Nexus5X/OPR1.170623.011 and Asus Zenfone 2Laser(ZE551KL)/MMB29P, with steps and apk(NewsWeather_3.4.0.apk) provided in #47 of b/34220171. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by creis@chromium.org
, Sep 26 2017