Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Don't load WebUI if provisional navigation is for non-chrome URL
Browse files Browse the repository at this point in the history
Putative fix for crbug.com/545479. If WebUIManager is created but
navigation occurs before the WebUI URL starts loading, provisional
navigation for a non-WebUI URL could be observed by WebUIManager, and
WebUI should not be loaded in that case.

BUG=545479

Review URL: https://codereview.chromium.org/1464383002

Cr-Commit-Position: refs/heads/master@{#361143}
(cherry picked from commit 3b976a6)

Review URL: https://codereview.chromium.org/1536423002 .

Cr-Commit-Position: refs/branch-heads/2564@{#408}
Cr-Branched-From: 1283eca-refs/heads/master@{#359700}
  • Loading branch information
Jackie Quinn committed Dec 21, 2015
1 parent 81936ef commit 75e9178
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/web/webui/crw_web_ui_manager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ - (void)dealloc {
- (void)webState:(web::WebState*)webState
didStartProvisionalNavigationForURL:(const GURL&)URL {
DCHECK(webState == _webState);
// If URL is not an application specific URL, ignore the navigation.
if (!web::GetWebClient()->IsAppSpecificURL(URL))
return;

GURL navigationURL(URL);
// Add request group ID to the URL, if not present. Request group ID may
// already be added if restoring state to a WebUI page.
Expand Down

0 comments on commit 75e9178

Please sign in to comment.