Commit 25db010d authored by David Jean's avatar David Jean Committed by Commit Bot

[ios] Addressed some TODO left behind in crw refactor

Bug: 956511
Change-Id: I3f64f693d26d0db9f54f84ef7e2a36fa713434d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247764
Commit-Queue: David Jean <djean@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779838}
parent e7be6d6b
...@@ -89,9 +89,8 @@ class WKBackForwardListItemHolder; ...@@ -89,9 +89,8 @@ class WKBackForwardListItemHolder;
- (instancetype)initWithDelegate:(id<CRWWKNavigationHandlerDelegate>)delegate - (instancetype)initWithDelegate:(id<CRWWKNavigationHandlerDelegate>)delegate
NS_DESIGNATED_INITIALIZER; NS_DESIGNATED_INITIALIZER;
// TODO(crbug.com/956511): Change this to readonly when // Indicates if the webview reported a crash.
// |webViewWebProcessDidCrash| is moved to CRWWKNavigationHandler. @property(nonatomic, assign, readonly) BOOL webProcessCrashed;
@property(nonatomic, assign) BOOL webProcessCrashed;
// Pending information for an in-progress page navigation. The lifetime of // Pending information for an in-progress page navigation. The lifetime of
// this object starts at |decidePolicyForNavigationAction| where the info is // this object starts at |decidePolicyForNavigationAction| where the info is
......
...@@ -206,7 +206,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation( ...@@ -206,7 +206,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation(
} }
} }
self.webProcessCrashed = NO; _webProcessCrashed = NO;
if (self.beingDestroyed) { if (self.beingDestroyed) {
decisionHandler(WKNavigationActionPolicyCancel); decisionHandler(WKNavigationActionPolicyCancel);
return; return;
...@@ -1192,7 +1192,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation( ...@@ -1192,7 +1192,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation(
[self didReceiveWKNavigationDelegateCallback]; [self didReceiveWKNavigationDelegateCallback];
_certVerificationErrors->Clear(); _certVerificationErrors->Clear();
self.webProcessCrashed = YES; _webProcessCrashed = YES;
self.webStateImpl->GetWebFramesManagerImpl().RemoveAllWebFrames(); self.webStateImpl->GetWebFramesManagerImpl().RemoveAllWebFrames();
[self.delegate navigationHandlerWebProcessDidCrash:self]; [self.delegate navigationHandlerWebProcessDidCrash:self];
...@@ -2456,9 +2456,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation( ...@@ -2456,9 +2456,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation(
originalContext { originalContext {
DCHECK(!base::FeatureList::IsEnabled(web::features::kUseJSForErrorPage)); DCHECK(!base::FeatureList::IsEnabled(web::features::kUseJSForErrorPage));
GURL placeholderURL = CreatePlaceholderUrlForUrl(originalURL); GURL placeholderURL = CreatePlaceholderUrlForUrl(originalURL);
// TODO(crbug.com/956511): Remove this code when NativeContent support is
// removed.
[self.delegate ensureWebViewCreatedForWebViewHandler:self];
WKWebView* webView = [self.delegate webViewForWebViewHandler:self]; WKWebView* webView = [self.delegate webViewForWebViewHandler:self];
NSURLRequest* request = NSURLRequest* request =
...@@ -2513,8 +2511,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation( ...@@ -2513,8 +2511,7 @@ void ReportOutOfSyncURLInDidStartProvisionalNavigation(
currentItem->SetReferrer(referrer); currentItem->SetReferrer(referrer);
} }
// TODO(crbug.com/956511): This shouldn't be called for hash state or // TODO(crbug.com/956511): This shouldn't be called for push/replaceState.
// push/replaceState.
[self resetDocumentSpecificState]; [self resetDocumentSpecificState];
[self.delegate navigationHandlerDidStartLoading:self]; [self.delegate navigationHandlerDidStartLoading:self];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment