New issue
Advanced search Search tips

Issue 798840 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task

Blocking:
issue 734150



Sign in to add a comment

WindowOpenByDOMTestCase fails with WKBasedNavigationManager

Project Member Reported by danyao@chromium.org, Jan 3 2018

Issue description

Failure message:
[0103/041132.552944:FATAL:wk_based_navigation_manager_impl.mm(34)] Check failed: wk_item.
0   ios_chrome_web_egtests              0x00000001104b3f4d base::debug::StackTrace::StackTrace(unsigned long) + 157
1   ios_chrome_web_egtests              0x00000001104b3f8d base::debug::StackTrace::StackTrace(unsigned long) + 29
2   ios_chrome_web_egtests              0x00000001104b2a1c base::debug::StackTrace::StackTrace() + 28
3   ios_chrome_web_egtests              0x0000000110514b8f logging::LogMessage::~LogMessage() + 479
4   ios_chrome_web_egtests              0x0000000110512535 logging::LogMessage::~LogMessage() + 21
5   ios_chrome_web_egtests              0x000000010f362473 (anonymous namespace)::SetNavigationItemInWKItem(WKBackForwardListItem*, std::__1::unique_ptr<web::NavigationItemImpl, std::__1::default_delete<web::NavigationItemImpl> >) + 259
6   ios_chrome_web_egtests              0x000000010f362cc5 web::WKBasedNavigationManagerImpl::CommitPendingItem() + 853
7   ios_chrome_web_egtests              0x000000010f38398b -[CRWWebController webPageChanged] + 667
8   ios_chrome_web_egtests              0x000000010f39a656 -[CRWWebController webView:didCommitNavigation:] + 3030
9   WebKit                              0x000000011ee25509 WebKit::NavigationState::NavigationClient::didCommitNavigation(WebKit::WebPageProxy&, API::Navigation*, API::Object*) + 91
10  WebKit                              0x000000011ef857a5 WebKit::WebPageProxy::didCommitLoadForFrame(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, std::optional<WebCore::HasInsecureContent>, WebKit::UserData const&) + 607

Failing test cases:
WindowOpenByDOMTestCase/testBlockPopupInjectedIntoOpenedWindow
WindowOpenByDOMTestCase/testWindowOpenAndCallLocationAssign
WindowOpenByDOMTestCase/testWindowOpenAndAssignToHref
WindowOpenByDOMTestCase/testWindowOpenAndSetLocation
WindowOpenByDOMTestCase/testWindowOpenWithMetaRefresh

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fb1967bd8e9dc2483a9a36f911e22ac00e18a505

commit fb1967bd8e9dc2483a9a36f911e22ac00e18a505
Author: Danyao Wang <danyao@chromium.org>
Date: Fri Jan 05 19:57:49 2018

[Nav Experiment] Fix empty window.open navigation edge case.

When window.open is called with an empty URL, the new WKWebView has
about:blank loaded but an empty WKBackForwardList. This causes
WKBasedNavigationManager::CommitPendingItem() to crash because there is
no WKBackForwardListItem to attach the NavigationItem.

This CL fixes this edge case by handling it completely within the
navigation manager, so this case appears to the client indistinguishable
from a length-1 navigation history.

With this CL, the following tests now pass:
WindowOpenByDOMTestCase/testBlockPopupInjectedIntoOpenedWindow
WindowOpenByDOMTestCase/testWindowOpenAndCallLocationAssign
WindowOpenByDOMTestCase/testWindowOpenAndAssignToHref
WindowOpenByDOMTestCase/testWindowOpenAndSetLocation
WindowOpenByDOMTestCase/testWindowOpenWithMetaRefresh

Bug:  798840 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I7c44f8d041ad79f48e1c613fda83c3f5b68faf32
Reviewed-on: https://chromium-review.googlesource.com/850995
Reviewed-by: Eugene But <eugenebut@chromium.org>
Commit-Queue: Danyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527359}
[modify] https://crrev.com/fb1967bd8e9dc2483a9a36f911e22ac00e18a505/ios/web/navigation/wk_based_navigation_manager_impl.h
[modify] https://crrev.com/fb1967bd8e9dc2483a9a36f911e22ac00e18a505/ios/web/navigation/wk_based_navigation_manager_impl.mm
[modify] https://crrev.com/fb1967bd8e9dc2483a9a36f911e22ac00e18a505/ios/web/navigation/wk_based_navigation_manager_impl_unittest.mm

Comment 2 by danyao@chromium.org, Mar 14 2018

Status: Fixed (was: Started)

Sign in to add a comment