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

Issue 1661423002: Solidify Entry discarding logic (NavigationHandle keeps its ID) (Closed)

Created:
4 years, 10 months ago by Charlie Harrison
Modified:
4 years, 9 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

This patch gives the NavigationHandle a NavigationEntry on instantiation, so it can know the entry's unique id. This id is used to for detecting mismatch on DidFailProvisionalLoad, so if the current handle does not match the pending entry, we won't discard it. We also use the handle's new entry id to more securely restrict cloning entries in NavigationCOntrollerImpl::RendererDidNavigateToNewPage. BUG=513742 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/9a9142bc4afafb16c2245ec30d018b0089e2d20f Cr-Commit-Position: refs/heads/master@{#378463}

Patch Set 1 #

Patch Set 2 : null checks #

Patch Set 3 : Added unittest #

Total comments: 28

Patch Set 4 : creis review #

Total comments: 11

Patch Set 5 : Addressed creis@ comments #

Patch Set 6 : Self review: remove includes and improve a comment #

Patch Set 7 : #

Total comments: 2

Patch Set 8 : nav id hack for data navs with base url #

Total comments: 8

Patch Set 9 : rebase + creis review #

Total comments: 9

Patch Set 10 : Don't initialize NavigationHandle with base url for data url #

Total comments: 13

Patch Set 11 : creis@ review #

Patch Set 12 : back to patch set 9 + paranoia #

Patch Set 13 : Patch test that surfaced a bug in chromeos #

Patch Set 14 : fixed typo #

Patch Set 15 : merge @377292 #

Total comments: 11

Patch Set 16 : fix plznavigate (I hope), compare base_urls, re-order ManageLink test #

Patch Set 17 : Fix check that's invalid when base url has invalid url. Added TODO #

Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -63 lines) Patch
M chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +9 lines, -5 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +14 lines, -6 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +44 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.h View 1 2 3 4 5 6 7 8 4 chunks +12 lines, -2 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -5 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/frame_host/navigation_request.h View 1 2 3 4 5 6 7 8 9 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +6 lines, -6 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +47 lines, -28 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +31 lines, -6 lines 0 comments Download
M content/public/browser/navigation_handle.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 55 (12 generated)
Charlie Harrison
PTAL. This is a WIP and I'm not 100% familiar with NavigationEntries, but it does ...
4 years, 10 months ago (2016-02-04 21:48:42 UTC) #3
Charlie Harrison
On 2016/02/04 at 21:48:42, csharrison wrote: > PTAL. This is a WIP and I'm not ...
4 years, 10 months ago (2016-02-05 15:00:59 UTC) #6
Charlie Reis
Thanks for tackling this! I'm going to depend on Camille (and/or Nasko) to verify that ...
4 years, 10 months ago (2016-02-05 19:36:12 UTC) #7
Charlie Harrison
Thanks for the review! I want this change to be good with PlzNavigate, so I ...
4 years, 10 months ago (2016-02-05 23:10:24 UTC) #8
Charlie Reis
Seems pretty good to me. I'll defer to Camille on the PlzNavigate behavior, and I've ...
4 years, 10 months ago (2016-02-06 00:54:58 UTC) #9
Charlie Harrison
On 2016/02/06 00:54:58, Charlie Reis wrote: > Seems pretty good to me. I'll defer to ...
4 years, 10 months ago (2016-02-07 00:05:28 UTC) #10
clamy
Thanks! The PlzNavigate part seems ok to me. I'll do another review once Charlie's comments ...
4 years, 10 months ago (2016-02-08 13:46:23 UTC) #11
Charlie Harrison
Thanks clamy@! creis@, Let me know your thoughts on the spoofing side of this. There ...
4 years, 10 months ago (2016-02-08 15:06:42 UTC) #12
Charlie Reis
On 2016/02/07 00:05:28, csharrison wrote: https://codereview.chromium.org/1661423002/diff/60001/content/browser/frame_host/navigator_impl.cc#newcode215 > > content/browser/frame_host/navigator_impl.cc:215: if > (pending_matches_fail_msg) > > { ...
4 years, 10 months ago (2016-02-08 19:44:06 UTC) #13
Charlie Harrison
On 2016/02/08 19:44:06, Charlie Reis wrote: > On 2016/02/07 00:05:28, csharrison wrote: > https://codereview.chromium.org/1661423002/diff/60001/content/browser/frame_host/navigator_impl.cc#newcode215 > ...
4 years, 10 months ago (2016-02-08 20:07:55 UTC) #14
Charlie Harrison
On 2016/02/08 20:07:55, csharrison wrote: > On 2016/02/08 19:44:06, Charlie Reis wrote: > > On ...
4 years, 10 months ago (2016-02-08 23:02:52 UTC) #15
Charlie Reis
On 2016/02/08 23:02:52, csharrison wrote: > Unfortunately if we compare handles at RendererDidNavigate, it causes ...
4 years, 10 months ago (2016-02-08 23:23:43 UTC) #16
Charlie Harrison
On 2016/02/08 23:23:43, Charlie Reis wrote: > On 2016/02/08 23:02:52, csharrison wrote: > > Unfortunately ...
4 years, 10 months ago (2016-02-09 13:33:28 UTC) #17
Charlie Reis
On 2016/02/09 13:33:28, csharrison wrote: > On 2016/02/08 23:23:43, Charlie Reis wrote: > > On ...
4 years, 10 months ago (2016-02-10 00:25:42 UTC) #18
Charlie Harrison
Still unsure about the best solution for data urls w/ base urls. I think we ...
4 years, 10 months ago (2016-02-11 20:23:05 UTC) #20
Charlie Harrison
I figured out how to handle base urls with a little bit of a hack. ...
4 years, 10 months ago (2016-02-16 20:54:46 UTC) #21
Charlie Reis
[+boliu] Bo, can you take a look at the change to RenderFrameImpl::didStartProvisionalLoad? We would pass ...
4 years, 10 months ago (2016-02-16 21:55:07 UTC) #23
Charlie Harrison
Looks like we're getting consistent failures from the chromeos bot. The errors are strange too. ...
4 years, 10 months ago (2016-02-16 22:55:23 UTC) #24
boliu
On 2016/02/16 21:55:07, Charlie Reis (catching up) wrote: > [+boliu] > > Bo, can you ...
4 years, 10 months ago (2016-02-16 23:46:02 UTC) #26
mnaganov (inactive)
On 2016/02/16 23:46:02, boliu wrote: > On 2016/02/16 21:55:07, Charlie Reis (catching up) wrote: > ...
4 years, 10 months ago (2016-02-16 23:57:58 UTC) #27
Charlie Harrison
On 2016/02/16 23:57:58, mnaganov wrote: > On 2016/02/16 23:46:02, boliu wrote: > > On 2016/02/16 ...
4 years, 10 months ago (2016-02-17 00:30:21 UTC) #28
boliu
On 2016/02/17 00:30:21, csharrison wrote: > On 2016/02/16 23:57:58, mnaganov wrote: > > On 2016/02/16 ...
4 years, 10 months ago (2016-02-17 00:48:00 UTC) #29
Charlie Reis
On 2016/02/17 00:48:00, boliu wrote: > On 2016/02/17 00:30:21, csharrison wrote: > > On 2016/02/16 ...
4 years, 10 months ago (2016-02-17 05:29:05 UTC) #30
Charlie Harrison
On 2016/02/17 05:29:05, Charlie Reis wrote: > On 2016/02/17 00:48:00, boliu wrote: > > On ...
4 years, 10 months ago (2016-02-17 21:33:34 UTC) #31
Charlie Reis
On 2016/02/17 21:33:34, csharrison wrote: > On 2016/02/17 05:29:05, Charlie Reis wrote: > > On ...
4 years, 10 months ago (2016-02-19 18:00:12 UTC) #32
Charlie Harrison
PTAL. I had to change the chromeos test. I think our misbehaving logic was covering ...
4 years, 10 months ago (2016-02-22 14:50:42 UTC) #33
Charlie Harrison
+bauerb@ for content_settings/
4 years, 10 months ago (2016-02-24 17:32:13 UTC) #35
Bernhard Bauer
https://codereview.chromium.org/1661423002/diff/280001/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc File chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc (right): https://codereview.chromium.org/1661423002/diff/280001/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc#newcode143 chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc:143: GURL("chrome://settings-frame/contentExceptions#media-stream-camera"); Why do we not do this for microphone?
4 years, 10 months ago (2016-02-25 09:32:43 UTC) #36
Charlie Harrison
https://codereview.chromium.org/1661423002/diff/280001/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc File chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc (right): https://codereview.chromium.org/1661423002/diff/280001/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc#newcode143 chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc:143: GURL("chrome://settings-frame/contentExceptions#media-stream-camera"); On 2016/02/25 at 09:32:43, Bernhard Bauer wrote: > ...
4 years, 10 months ago (2016-02-25 13:24:17 UTC) #37
Bernhard Bauer
https://codereview.chromium.org/1661423002/diff/280001/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc File chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc (right): https://codereview.chromium.org/1661423002/diff/280001/chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc#newcode143 chrome/browser/ui/content_settings/content_setting_bubble_model_browsertest.cc:143: GURL("chrome://settings-frame/contentExceptions#media-stream-camera"); On 2016/02/25 13:24:17, csharrison wrote: > On 2016/02/25 ...
4 years, 10 months ago (2016-02-25 13:47:07 UTC) #38
Charlie Reis
content/ LGTM with one question. https://codereview.chromium.org/1661423002/diff/280001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/1661423002/diff/280001/content/browser/frame_host/render_frame_host_impl.cc#newcode1036 content/browser/frame_host/render_frame_host_impl.cc:1036: frame_tree_node()->navigator()->GetController()->GetPendingEntry(); I take it ...
4 years, 10 months ago (2016-02-25 22:22:33 UTC) #39
clamy
Thanks! A few questions. https://codereview.chromium.org/1661423002/diff/280001/content/browser/frame_host/navigator_impl.cc File content/browser/frame_host/navigator_impl.cc (right): https://codereview.chromium.org/1661423002/diff/280001/content/browser/frame_host/navigator_impl.cc#newcode159 content/browser/frame_host/navigator_impl.cc:159: navigation_start, pending_entry ? pending_entry->GetUniqueID() : ...
4 years, 10 months ago (2016-02-26 14:08:13 UTC) #40
clamy
I'm also having your patch run through the PlzNavigate trybot (note: it will return red ...
4 years, 10 months ago (2016-02-26 14:25:45 UTC) #41
Charlie Harrison
I think my changes ensure that subframes will get 0 as a pending_nav_entry_id. https://codereview.chromium.org/1661423002/diff/280001/content/browser/frame_host/navigator_impl.cc File ...
4 years, 10 months ago (2016-02-26 17:39:51 UTC) #42
Bernhard Bauer
lgtm
4 years, 9 months ago (2016-02-29 12:23:55 UTC) #43
clamy
Thanks! PlzNavigate part lgtm.
4 years, 9 months ago (2016-02-29 16:41:39 UTC) #44
Charlie Harrison
On 2016/02/29 16:41:39, clamy wrote: > Thanks! PlzNavigate part lgtm. Charlie, there was some difficulty ...
4 years, 9 months ago (2016-02-29 19:19:17 UTC) #45
Charlie Harrison
Landing this for now as the checks in RenderFrameHostImpl are sufficient to match data urls ...
4 years, 9 months ago (2016-03-01 14:25:13 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1661423002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1661423002/320001
4 years, 9 months ago (2016-03-01 14:26:08 UTC) #49
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years, 9 months ago (2016-03-01 17:24:15 UTC) #51
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/9a9142bc4afafb16c2245ec30d018b0089e2d20f Cr-Commit-Position: refs/heads/master@{#378463}
4 years, 9 months ago (2016-03-01 17:25:09 UTC) #53
dschuyler
A revert of this CL (patchset #17 id:320001) has been created in https://codereview.chromium.org/1755733002/ by dschuyler@chromium.org. ...
4 years, 9 months ago (2016-03-01 18:01:06 UTC) #54
Charlie Harrison
4 years, 9 months ago (2016-03-03 21:35:41 UTC) #55
Message was sent while issue was closed.
On 2016/03/01 at 18:01:06, dschuyler wrote:
> A revert of this CL (patchset #17 id:320001) has been created in
https://codereview.chromium.org/1755733002/ by dschuyler@chromium.org.
> 
> The reason for reverting is: The android tree auto closed.  I don't see which
CL
> is causing the trouble, so this is a guess.
> 
> Here are some logs from
https://build.chromium.org/p/chromium/builders/Android/builds/52518
> 
> [6697/26456] CXX obj/third_party/skia/src/effects/skia_library.SkPackBits.o
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> [6698/26456] STAMP obj/third_party/junit/junit_jar.actions_rules_copies.stamp
> [6699/26456] STAMP obj/third_party/mockito/mockito_jar.actions_depends.stamp
> [6700/26456] ACTION Compiling mockito_jar java sources
> FAILED: cd ../../ui/accessibility; python ../../build/android/gyp/lint.py
"--lint-path=/b/build/slave/Android/build/src/third_party/android_tools/sdk//tools/lint"
"--config-path=../../build/android/lint/suppressions.xml"
"--processed-config-path=../../out/Release/gen/ui_accessibility_java/lint_config.xml"
"--manifest-path=../../build/android/AndroidManifest.xml"
"--result-path=../../out/Release/gen/ui_accessibility_java/lint_result.xml"
"--resource-dir=../../build/android/ant/empty/res"
"--product-dir=../../out/Release" "--src-dirs=../../build/android/empty/src"
"--jar-path=../../out/Release/lib.java/ui_accessibility_java.jar"
--can-fail-build
"--stamp=../../out/Release/gen/ui_accessibility_java/lint.stamp" --enable
> Lint created unparseable xml file...
> File contents:
> 
> Traceback (most recent call last):
>   File "../../build/android/gyp/lint.py", line 231, in <module>
>     sys.exit(main())
>   File "../../build/android/gyp/lint.py", line 227, in main
>     pass_changes=True)
>   File
"/b/build/slave/Android/build/src/build/android/gyp/util/build_utils.py", line
513, in CallAndWriteDepfileIfStale
>     pass_changes=True)
>   File "/b/build/slave/Android/build/src/build/android/gyp/util/md5_check.py",
line 87, in CallAndRecordIfStale
>     function(*args)
>   File
"/b/build/slave/Android/build/src/build/android/gyp/util/build_utils.py", line
500, in on_stale_md5
>     function(*args)
>   File "../../build/android/gyp/lint.py", line 222, in <lambda>
>     can_fail_build=options.can_fail_build),
>   File "../../build/android/gyp/lint.py", line 136, in _OnStaleMd5
>     num_issues = _ParseAndShowResultFile()
>   File "../../build/android/gyp/lint.py", line 54, in _ParseAndShowResultFile
>     dom = minidom.parse(result_path)
>   File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
>     return expatbuilder.parse(file)
>   File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
>     result = builder.parseFile(fp)
>   File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 211, in parseFile
>     parser.Parse("", True)
> xml.parsers.expat.ExpatError: no element found: line 1, column 0
> Note: Some input files use or override a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> Note: Some input files use unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> ninja: build stopped: subcommand failed.
> .

FYI this change was not reverted, as the tree closure was a flake.

Powered by Google App Engine
This is Rietveld 408576698