Changeset 240485 in webkit
- Timestamp:
- Jan 25, 2019 10:54:54 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r240484 r240485 1 2019-01-25 Chris Dumez <cdumez@apple.com> 2 3 Regression(PSON) cross-site provisional page is not canceled if a new same-site one is started 4 https://bugs.webkit.org/show_bug.cgi?id=193788 5 <rdar://problem/47531231> 6 7 Reviewed by Alex Christensen. 8 9 When the page starts a new provisional load, make sure we cancel any pending one in the provisional 10 process, as it would have happened in the first provisional load happened in the same process. 11 Without this, we could have 2 parallel loads happening, one in the committed process and another 12 in the provisional one, leading to assertion failures in debug. 13 14 * UIProcess/WebPageProxy.cpp: 15 (WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared): 16 1 17 2019-01-25 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r240484 r240485 3776 3776 MESSAGE_CHECK_URL(process, url); 3777 3777 3778 // If the page starts a new main frame provisional load, then cancel any pending one in a provisional process. 3779 if (frame->isMainFrame() && m_provisionalPage && m_provisionalPage->mainFrame() != frame) { 3780 m_provisionalPage->cancel(); 3781 m_provisionalPage = nullptr; 3782 } 3783 3778 3784 // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache. 3779 3785 RefPtr<API::Navigation> navigation; -
trunk/Tools/ChangeLog
r240483 r240485 1 2019-01-25 Chris Dumez <cdumez@apple.com> 2 3 Regression(PSON) cross-site provisional page is not canceled if a new same-site one is started 4 https://bugs.webkit.org/show_bug.cgi?id=193788 5 <rdar://problem/47531231> 6 7 Reviewed by Alex Christensen. 8 9 Add API test coverage. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 12 (-[PSONNavigationDelegate webView:didStartProvisionalNavigation:]): 13 1 14 2019-01-25 Jonathan Bedard <jbedard@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
r240477 r240485 62 62 63 63 static bool done; 64 static bool didStartProvisionalLoad; 64 65 static bool failed; 65 66 static bool didCreateWebView; … … 120 121 } 121 122 123 - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(null_unspecified WKNavigation *)navigation 124 { 125 didStartProvisionalLoad = true; 126 } 127 122 128 - (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler 123 129 { … … 2257 2263 2258 2264 EXPECT_EQ(1u, seenPIDs.size()); 2265 } 2266 2267 TEST(ProcessSwap, DoSameSiteNavigationAfterCrossSiteProvisionalLoadStarted) 2268 { 2269 auto processPoolConfiguration = adoptNS([[_WKProcessPoolConfiguration alloc] init]); 2270 [processPoolConfiguration setProcessSwapsOnNavigation:YES]; 2271 auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); 2272 2273 auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); 2274 [webViewConfiguration setProcessPool:processPool.get()]; 2275 auto handler = adoptNS([[PSONScheme alloc] init]); 2276 [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON"]; 2277 2278 auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); 2279 auto delegate = adoptNS([[PSONNavigationDelegate alloc] init]); 2280 [webView setNavigationDelegate:delegate.get()]; 2281 2282 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; 2283 [webView loadRequest:request]; 2284 2285 TestWebKitAPI::Util::run(&done); 2286 done = false; 2287 2288 auto webkitPID = [webView _webProcessIdentifier]; 2289 2290 didStartProvisionalLoad = false; 2291 request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; 2292 [webView loadRequest:request]; 2293 2294 TestWebKitAPI::Util::run(&didStartProvisionalLoad); 2295 didStartProvisionalLoad = false; 2296 2297 request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]]; 2298 [webView loadRequest:request]; 2299 2300 TestWebKitAPI::Util::run(&done); 2301 done = false; 2302 2303 EXPECT_WK_STREQ(@"pson://www.webkit.org/main2.html", [[webView URL] absoluteString]); 2304 EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]); 2259 2305 } 2260 2306
Note: See TracChangeset
for help on using the changeset viewer.