PSON: Triggering a navigation to an invalid URL creates a new WebContent process
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2018 22:30:43 +0000 (22:30 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2018 22:30:43 +0000 (22:30 +0000)
commit5631b8bb7fdc560ef441d024ea2891731447b04d
treed32420774bc451ecb436171d77fe7de7b2ef3e2b
parent6bcfa7f7a43e25fd472c9507e024b80901efcdc8
PSON: Triggering a navigation to an invalid URL creates a new WebContent process
https://bugs.webkit.org/show_bug.cgi?id=185066

Reviewed by Youenn Fablet.

Source/WebKit:

Don't create a new WebContent process when the target URL is invalid as well as when the source URL is invalid.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):

Tools:

Added a new test case (ProcessSwap.NavigateToInvalidURL) for navigating to an invalid URL.
WebKit should not swap WebContent process in this case.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
(-[PSONUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebProcessPool.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm