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

Issue 2153573002: Simplify RenderFrameImpl::decidePolicyForNavigation and avoid DCHECK (Closed)

Created:
4 years, 5 months ago by Tom Sepez
Modified:
4 years, 5 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify RenderFrameImpl::decidePolicyForNavigation and avoid DCHECK. DCHECK can be tripped when there is a chain of openers or when the opener has been cleared. The subsequent comparison against file: fails, and we may make a browser navigation where one could have been avoided, but it is still correct. Since it is still correct, we can simplify the check, perhaps forking in more cases that we used to, but that doesn't matter. BUG=622509 R=creis@chromium.org Committed: https://crrev.com/6573f1eaf729320beeaf776674b124bfe5c330bb Cr-Commit-Position: refs/heads/master@{#405609}

Patch Set 1 #

Total comments: 2

Patch Set 2 : simplify logic #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -7 lines) Patch
M content/renderer/render_frame_impl.cc View 1 1 chunk +4 lines, -7 lines 0 comments Download

Messages

Total messages: 22 (13 generated)
Tom Sepez
Charlie, for review.
4 years, 5 months ago (2016-07-14 20:13:25 UTC) #3
Charlie Reis
Thanks! Wondering if we can go one step further. https://codereview.chromium.org/2153573002/diff/1/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (left): https://codereview.chromium.org/2153573002/diff/1/content/renderer/render_frame_impl.cc#oldcode4986 content/renderer/render_frame_impl.cc:4986: ...
4 years, 5 months ago (2016-07-14 21:16:47 UTC) #4
Tom Sepez
https://codereview.chromium.org/2153573002/diff/1/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (left): https://codereview.chromium.org/2153573002/diff/1/content/renderer/render_frame_impl.cc#oldcode4986 content/renderer/render_frame_impl.cc:4986: source_url = frame_->opener()->top()->document().url(); On 2016/07/14 21:16:47, Charlie Reis wrote: ...
4 years, 5 months ago (2016-07-14 21:27:59 UTC) #7
Charlie Reis
Thanks, LGTM. Don't forget to update the CL description.
4 years, 5 months ago (2016-07-14 21:31:57 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2153573002/20001
4 years, 5 months ago (2016-07-14 21:36:43 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-14 22:36:23 UTC) #17
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/6573f1eaf729320beeaf776674b124bfe5c330bb Cr-Commit-Position: refs/heads/master@{#405609}
4 years, 5 months ago (2016-07-14 22:39:00 UTC) #19
tkent
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2150243002/ by tkent@chromium.org. ...
4 years, 5 months ago (2016-07-15 04:15:17 UTC) #20
Charlie Reis
4 years, 5 months ago (2016-07-15 04:25:35 UTC) #22
Message was sent while issue was closed.
On 2016/07/15 04:15:17, tkent wrote:
> A revert of this CL (patchset #2 id:20001) has been created in
> https://codereview.chromium.org/2150243002/ by mailto:tkent@chromium.org.
> 
> The reason for reverting is: Broke a layout test
> fast/events/popup-allowed-from-gesture-initiated-form-submit.html .
> 
>
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpec...
> .

The crash was due to a POST to a file:// URL:

20:44:37.988 5273  
[11930:11930:0714/204437:3914558297:FATAL:navigation_controller_impl.cc(673)]
Check failed: false. Http post load must use http(s) scheme.
20:44:37.988 5273   #0 0x000002834c1e base::debug::StackTrace::StackTrace()
20:44:37.988 5273   #1 0x000002849ddb logging::LogMessage::~LogMessage()
20:44:37.988 5273   #2 0x0000023ff03e
content::NavigationControllerImpl::LoadURLWithParams()
20:44:37.988 5273   #3 0x0000027f3fa3 content::Shell::OpenURLFromTab()
20:44:37.988 5273   #4 0x0000026c6188 content::WebContentsImpl::RequestOpenURL()
20:44:37.988 5273   #5 0x00000240cc0c content::NavigatorImpl::RequestOpenURL()
20:44:37.988 5273   #6 0x000002419ab3 content::RenderFrameHostImpl::OpenURL()

I think lukasza@ was intending to loosen that restriction, so maybe we can check
with him when he gets back from vacation next week.

Anyway, glad to see there's some test coverage for this.  :)

Powered by Google App Engine
This is Rietveld 408576698