Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2017 01:35:13 +0000 (01:35 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2017 01:35:13 +0000 (01:35 +0000)
commit48edcfcb4337c7f9ef57ceca0155d2a14a99d2c5
treee7ee4d9e689f7447e3d26ac29d38d110e416d8a3
parentdc3891229cfad55db3df785e7cd9fbe0cae9759f
Refactor WebViewImpl creation in preparation for supporting multiple WebsiteDataStores.
https://bugs.webkit.org/show_bug.cgi?id=168676

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Allow for WebViewImpl creation to fail.

* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processPool:configuration:]): Ditto.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::maybeCreate):
(WebKit::WebViewImpl::WebViewImpl):

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess): New WebProcess creation might fail. Handle it.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::warmInitialProcess):
(WebKit::WebProcessPool::maybeCreateNewWebProcessRespectingProcessCountLimit): This can now fail
  if the process will have a non-default WebsiteDataStore but we've already reached the process cap.
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit): Deleted.
* UIProcess/WebProcessPool.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/UIProcess/WebProcessPool.h