A prewarmed Web process should have a process assertion.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 19:11:57 +0000 (19:11 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Feb 2019 19:11:57 +0000 (19:11 +0000)
commit97790ae293f5c180e63e047a9f955ecbc9b7889a
tree3f8f159f418a24928788202395cfb8f8487e84a5
parentc790b99deca267248b9bc1463acea24b220dd592
A prewarmed Web process should have a process assertion.
https://bugs.webkit.org/show_bug.cgi?id=195006

Reviewed by Geoffrey Garen.

To make sure the prewarm message is handled in the Web process before the process is suspended,
the process should have a process assertion. This can be fixed by sending the prewarm message
inside WebProcessPool::initializeNewWebProcess, since all message sent inside this method are
guaranteed to be handled before the WebContent process is suspended.

This patch is based on Chris Dumez' idea and obervation of the issue.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebProcessPool.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242050 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h