Changeset 248598 in webkit
- Timestamp:
- Aug 13, 2019 10:12:43 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r248593 r248598 1 2019-08-13 Chris Dumez <cdumez@apple.com> 2 3 Crash under IPC::Connection::markCurrentlyDispatchedMessageAsInvalid() 4 https://bugs.webkit.org/show_bug.cgi?id=200674 5 <rdar://problem/50692748> 6 7 Reviewed by Geoff Garen. 8 9 When the client terminates a provisional process (e.g. via the [WKWebView _killWebContentProcessAndResetState] 10 SPI), the WebProcessProxy would notify its associated WebPageProxy objects that it had terminated but would fail 11 to notify its associated ProvisionalPageProxy objects. As a result, those objects would not get destroyed and 12 would still think that they were in the middle of a provisional load the next time a load started. This inconsistent 13 state would lead to crashes such as the one in the radar. 14 15 * UIProcess/ProvisionalPageProxy.cpp: 16 (WebKit::ProvisionalPageProxy::cancel): 17 * UIProcess/WebProcessProxy.cpp: 18 (WebKit::WebProcessProxy::requestTermination): 19 1 20 2019-08-13 Youenn Fablet <youenn@apple.com> 2 21 -
trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
r248585 r248598 121 121 if (m_provisionalLoadURL.isEmpty()) 122 122 return; 123 124 ASSERT(m_process->state() == WebProcessProxy::State::Running); 123 125 124 126 RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "cancel: Simulating a didFailProvisionalLoadForFrame for pageID = %" PRIu64, m_page.pageID().toUInt64()); -
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
r248333 r248598 1034 1034 webConnection()->didClose(); 1035 1035 1036 auto provisionalPages = WTF::map(m_provisionalPages, [](auto* provisionalPage) { return makeWeakPtr(provisionalPage); }); 1036 1037 auto pages = copyToVectorOf<RefPtr<WebPageProxy>>(m_pageMap.values()); 1037 1038 … … 1040 1041 for (auto& page : pages) 1041 1042 page->processDidTerminate(reason); 1043 1044 for (auto& provisionalPage : provisionalPages) { 1045 if (provisionalPage) 1046 provisionalPage->processDidTerminate(); 1047 } 1042 1048 } 1043 1049 -
trunk/Tools/ChangeLog
r248586 r248598 1 2019-08-13 Chris Dumez <cdumez@apple.com> 2 3 Crash under IPC::Connection::markCurrentlyDispatchedMessageAsInvalid() 4 https://bugs.webkit.org/show_bug.cgi?id=200674 5 <rdar://problem/50692748> 6 7 Reviewed by Geoff Garen. 8 9 Add API test coverage. 10 11 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 12 1 13 2019-08-12 Takashi Komori <Takashi.Komori@sony.com> 2 14 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
r247073 r248598 641 641 } 642 642 643 TEST(ProcessSwap, KillProvisionalWebContentProcessThenStartNewLoad) 644 { 645 auto processPoolConfiguration = psonProcessPoolConfiguration(); 646 auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]); 647 648 auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]); 649 [webViewConfiguration setProcessPool:processPool.get()]; 650 auto handler = adoptNS([[PSONScheme alloc] init]); 651 [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"PSON"]; 652 653 auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]); 654 auto navigationDelegate = adoptNS([[PSONNavigationDelegate alloc] init]); 655 [webView setNavigationDelegate:navigationDelegate.get()]; 656 657 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; 658 [webView loadRequest:request]; 659 660 TestWebKitAPI::Util::run(&done); 661 done = false; 662 663 // When the provisional load starts in the provisional process, kill the WebView's processes. 664 navigationDelegate->didStartProvisionalNavigationHandler = ^{ 665 [webView _killWebContentProcessAndResetState]; 666 done = true; 667 }; 668 669 // Start a new cross-site load, which should happen in a new provisional process. 670 request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; 671 [webView loadRequest:request]; 672 673 TestWebKitAPI::Util::run(&done); 674 done = false; 675 676 navigationDelegate->didStartProvisionalNavigationHandler = nil; 677 678 request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]]; 679 [webView loadRequest:request]; 680 681 TestWebKitAPI::Util::run(&done); 682 done = false; 683 } 684 643 685 TEST(ProcessSwap, NoSwappingForeTLDPlus2) 644 686 {
Note: See TracChangeset
for help on using the changeset viewer.