Commit 36dcfa09 authored by andersca@apple.com's avatar andersca@apple.com

Don't kill our XPC services in response to memory pressure

https://bugs.webkit.org/show_bug.cgi?id=114985
<rdar://problem/13229217>

Reviewed by Mark Rowe.

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
Call xpc_transaction_begin() so we'll never be killed by the kernel when there's memory pressure;
we prefer to manage our own lifetime thank you very much!

* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::platformInitialize):
Remove call to disable sudden termination.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 798919bf
2013-04-22 Anders Carlsson <andersca@apple.com>
Don't kill our XPC services in response to memory pressure
https://bugs.webkit.org/show_bug.cgi?id=114985
<rdar://problem/13229217>
Reviewed by Mark Rowe.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
Call xpc_transaction_begin() so we'll never be killed by the kernel when there's memory pressure;
we prefer to manage our own lifetime thank you very much!
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::platformInitialize):
Remove call to disable sudden termination.
2013-04-22 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13681842> [Mac] Tweak WebProcess sandbox profile to use
......@@ -59,6 +59,10 @@ void XPCServiceInitializer(xpc_connection_t connection, xpc_object_t initializer
{
XPCServiceInitializerDelegateType delegate(connection, initializerMessage);
// We don't want XPC to be in charge of whether the process should be terminated or not,
// so ensure that we have an outstanding transaction here.
xpc_transaction_begin();
InitializeWebKit2();
ChildProcessInitializationParameters parameters;
......
......@@ -100,10 +100,6 @@ void ChildProcess::platformInitialize()
// Starting with process suppression disabled. The proxy for this process will enable if appropriate from didFinishLaunching().
setProcessSuppressionEnabled(false);
// <rdar://problem/13229217> Sudden Termination is causing WebContent XPC services to be killed in response to memory pressure
// Hence, disable it until we can identify if it is being enabled in error or not.
[[NSProcessInfo processInfo] disableSuddenTermination];
[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment