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

Issue 2965563002: Fix crash for renderer-initiated same-document navigation. (Closed)

Created:
3 years, 5 months ago by Eugene But (OOO till 7-30)
Modified:
3 years, 5 months ago
Reviewers:
kkhorimoto, danyao, cmasso1
CC:
chromium-reviews, ios-reviews+web_chromium.org, ios-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed crash for renderer-initiated same-document navigation. This CL handles the case when renderer performs fragment change navigation right after user-initiated fast back-forward navigation. * renderer-initiated is navigation requested by a web page (changing the fragment in this case) * user-initiated is navigation requested by the user via browser ui (tapping back button in this case) * fast back-forward navigation is navigation where the page is retrieved from the page cache rather than from the network (via |goToBackForwardListItem:| WKWebView API in this case). This is a recent regression caused by introducing NavigationContext object, which should be created before navigation started and destroyed after the navigation is finished. This CL creates NavigationContext during conditions described above. BUG=737595 TBR=kkhorimoto@chromium.org Review-Url: https://codereview.chromium.org/2965563002 Cr-Commit-Position: refs/heads/master@{#483574} Committed: https://chromium.googlesource.com/chromium/src/+/0a9d03ce07a9bec7a397bbb08c2bec0fe0e91d66

Patch Set 1 #

Patch Set 2 : Self review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -8 lines) Patch
M ios/web/web_state/ui/crw_web_controller.mm View 1 1 chunk +17 lines, -8 lines 0 comments Download

Messages

Total messages: 24 (15 generated)
Eugene But (OOO till 7-30)
Hi Danyao, Me and Kurt are the only people who understand this code well and ...
3 years, 5 months ago (2017-06-29 20:00:09 UTC) #7
danyao
LGTM Do we know why the same-document navigation was not caught in URLDidChangeWithoutDocumentChange?
3 years, 5 months ago (2017-06-29 20:48:22 UTC) #8
Eugene But (OOO till 7-30)
On 2017/06/29 20:48:22, danyao wrote: > LGTM > > Do we know why the same-document ...
3 years, 5 months ago (2017-06-29 22:00:45 UTC) #9
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/2965563002/20001
3 years, 5 months ago (2017-06-30 01:06:33 UTC) #11
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 5 months ago (2017-06-30 01:06:36 UTC) #13
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/2965563002/20001
3 years, 5 months ago (2017-06-30 01:09:23 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/0a9d03ce07a9bec7a397bbb08c2bec0fe0e91d66
3 years, 5 months ago (2017-06-30 01:13:26 UTC) #21
cmasso1
Can we write tests to prevent this from happening again?
3 years, 5 months ago (2017-07-05 18:51:59 UTC) #23
Eugene But (OOO till 7-30)
3 years, 5 months ago (2017-07-05 18:59:26 UTC) #24
Message was sent while issue was closed.
On 2017/07/05 18:51:59, cmasso1 wrote:
> Can we write tests to prevent this from happening again?
This is very narrow use case to write EG test. WEbController is not testable, so
unit test can not be written as well. WC will be covered by tests after
refacorings which are planned in the future.

Powered by Google App Engine
This is Rietveld 408576698