[WK2] Track multiple Web Processes per context
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 21:06:41 +0000 (21:06 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2012 21:06:41 +0000 (21:06 +0000)
commit9f7050162e3c05cd724886761bfaeda229c485d6
tree5d660957af3097598fd936dd0219776734be9861
parent0379053974d88f342af3a1378647283972282c6e
    [WK2] Track multiple Web Processes per context
        https://bugs.webkit.org/show_bug.cgi?id=93915

        Reviewed by Sam Weinig.

        * UIProcess/Downloads/DownloadProxy.cpp:
        (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): Downloads don't work
        yet, added a FIXME.

        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::deprecatedSharedProcess): Renamed from process(), added an
        assertion that this is only used in single proces mode.
        (WebKit::WebContext::textCheckerStateChanged): Abstract out access to web processes.
        (WebKit::WebContext::ensureSharedWebProcess): Renamed ensureWebProcess() for clarity.
        (WebKit::WebContext::createNewWebProcess): Extracted code for creating a process
        from ensureWebProcess().
        (WebKit::WebContext::warmInitialProcess): Create the process more explicitly.
        (WebKit::WebContext::enableProcessTermination): Iterate over all processes.
        (WebKit::WebContext::shouldTerminate): Updated assertion.
        (WebKit::WebContext::processDidFinishLaunching): Changed to use process argument
        instead of m_process.
        (WebKit::WebContext::disconnectProcess): Updated code forto use m_processes.
        (WebKit::WebContext::createWebPage): Handle both process policies (initial support
        for multi-process).
        (WebKit::WebContext::relaunchProcessIfNecessary): Added cases for both policies.
        (WebKit::WebContext::download): Ditto.
        (WebKit::WebContext::postMessageToInjectedBundle): Ditto.
        (WebKit::WebContext::didReceiveSyncMessage): Fixed whitespace.
        (WebKit::WebContext::getWebCoreStatistics): Added cases for both policies.

        * UIProcess/WebContext.h:
        (WebKit::WebContext::sendToAllProcesses):
        (WebKit::WebContext::sendToAllProcessesRelaunchingThemIfNecessary):
        Send to all processes. Changed return type to void, since no caller checked it.

        * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::createWebPage): Removed
        an assertion that assumed one process per context.

        * UIProcess/WebTextChecker.cpp: (WebKit::updateStateForAllWebProcesses): Updated
        to use a WebContext method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@125602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/WebTextChecker.cpp