12012-12-18 Kiran Muppala <cmuppala@apple.com>
2
3 Adopt new assertion SPI for process suppression on Mac
4 https://bugs.webkit.org/show_bug.cgi?id=105378
5
6 Reviewed by NOBODY (OOPS!).
7
8 Process suppression for WebKit2 child processes is currently enabled or disabled using AutomaticTermination.
9 This should be replaced with a new assertion SPI specific to process suppression.
10
11 * Shared/ChildProcess.cpp:
12 (WebKit::ChildProcess::ChildProcess): Remove unused member variable m_applicationIsOccluded.
13 The occlusion state is now captured by m_processAssertionVisible.
14 * Shared/ChildProcess.h:
15 * Shared/mac/ChildProcessMac.mm:
16 (WebKit::ChildProcess::setApplicationIsOccluded): Use m_processAssertionVisible to check if the occlusion
17 state has changed and call enable/disableProcessSuppression() accordingly.
18 (WebKit::ChildProcess::disableProcessSuppression): Take assertion using the new WKSI SPI wrapper function
19 WKGetNSProcessInfoProcessAssertionVisible().
20 (WebKit::ChildProcess::enableProcessSuppression): Release assertion retained by m_processAssertionVisible.
21 (WebKit::ChildProcess::platformInitialize): Remove call to initializeTimerCoalescingPolicy(), since taking
22 a process visible assertion also sets the timer coalescing policy appropriately.
23