Commit d1368685 authored by Danyao Wang's avatar Danyao Wang Committed by Commit Bot

[Nav Experiment] Disable Prerender if WKBasedNavigationManager is used

WKBasedNavigationManager does not yet inject session history into new
WKWebViews created by PrerenderService. Disable PrerenderService for
now so we can measure the load performance impact in Finch experiment.

Bug: 814789
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Iad1db96832dc2e30ab85aa6b8939b8e5850ad250
Reviewed-on: https://chromium-review.googlesource.com/1012494Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Danyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551501}
parent 26391829
......@@ -7,6 +7,7 @@
#import "ios/chrome/browser/prerender/preload_controller.h"
#import "ios/chrome/browser/tabs/legacy_tab_helper.h"
#import "ios/chrome/browser/tabs/tab.h"
#include "ios/web/public/web_client.h"
#include "ios/web/public/web_state/web_state.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
......@@ -32,6 +33,13 @@ void PrerenderService::StartPrerender(const GURL& url,
const web::Referrer& referrer,
ui::PageTransition transition,
bool immediately) {
// PrerenderService is not compatible with WKBasedNavigationManager because it
// loads the URL in a new WKWebView, which doesn't have the current session
// history. TODO(crbug.com/814789): decide whether PrerenderService needs to
// be supported after evaluating the performance impact in Finch experiment.
if (web::GetWebClient()->IsSlimNavigationManagerEnabled())
return;
[controller_ prerenderURL:url
referrer:referrer
transition:transition
......
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