Adopt new assertion SPI for process suppression on Mac
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2012 05:57:47 +0000 (05:57 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2012 05:57:47 +0000 (05:57 +0000)
commit96756a4e1253fc8583515be4e043796c316a4347
tree7a9d38f2c038252f73a30944a249f6de8d15cd8a
parentb8b6d2bfa7f0f7995e42bd7d05f3c8c22d22dae4
Adopt new assertion SPI for process suppression on Mac
https://bugs.webkit.org/show_bug.cgi?id=105378

Patch by Kiran Muppala <cmuppala@apple.com> on 2012-12-19
Reviewed by Mark Rowe.

Source/WebKit2:

Process suppression for WebKit2 child processes is currently enabled or disabled using AutomaticTermination.
This should be replaced with a new assertion SPI specific to process suppression.

* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::ChildProcess): Remove unused member variable m_applicationIsOccluded.
* Shared/ChildProcess.h:
(WebKit::ChildProcess::applicationIsOccluded): Infer occlusion state from m_processVisibleAssertion.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setApplicationIsOccluded): Use applicationIsOccluded() accessor to check if the
occlusion state has changed and take or release a process visible assertion accordingly.
(WebKit::ChildProcess::platformInitialize): Remove call to initializeTimerCoalescingPolicy(), since taking
a process visible assertion also sets the timer coalescing policy appropriately.  Set the occlusion
state to false on initialization.

WebKitLibraries:

Add WKNSProcessInfoProcessAssertionWithTypes().

* WebKitSystemInterface.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@138226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/ChildProcess.cpp
Source/WebKit2/Shared/ChildProcess.h
Source/WebKit2/Shared/mac/ChildProcessMac.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h