Title: [135020] trunk/Source/WebKit2
- Revision
- 135020
- Author
- commit-qu...@webkit.org
- Date
- 2012-11-16 17:34:20 -0800 (Fri, 16 Nov 2012)
Log Message
Set task priority of WebKit2 processes to zero on Mac
https://bugs.webkit.org/show_bug.cgi?id=102567
Patch by Kiran Muppala <cmupp...@apple.com> on 2012-11-16
Reviewed by Mark Rowe.
Explicitly set task priority of WebKit2 processes to zero, to
override automatic priority determination by the system.
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::ChildProcess): Add call to platformInitialize() and
move MAC specific call to disableProcessSuppression to platformInitialize.
(WebKit::ChildProcess::platformInitialize): Dummy for non MAC platforms.
* Shared/ChildProcess.h:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::platformInitialize): Add call to setpriority().
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (135019 => 135020)
--- trunk/Source/WebKit2/ChangeLog 2012-11-17 01:06:53 UTC (rev 135019)
+++ trunk/Source/WebKit2/ChangeLog 2012-11-17 01:34:20 UTC (rev 135020)
@@ -1,3 +1,21 @@
+2012-11-16 Kiran Muppala <cmupp...@apple.com>
+
+ Set task priority of WebKit2 processes to zero on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=102567
+
+ Reviewed by Mark Rowe.
+
+ Explicitly set task priority of WebKit2 processes to zero, to
+ override automatic priority determination by the system.
+
+ * Shared/ChildProcess.cpp:
+ (WebKit::ChildProcess::ChildProcess): Add call to platformInitialize() and
+ move MAC specific call to disableProcessSuppression to platformInitialize.
+ (WebKit::ChildProcess::platformInitialize): Dummy for non MAC platforms.
+ * Shared/ChildProcess.h:
+ * Shared/mac/ChildProcessMac.mm:
+ (WebKit::ChildProcess::platformInitialize): Add call to setpriority().
+
2012-11-16 Brady Eidson <beid...@apple.com>
Move resource loader messaging from NetworkConnectionToWebProcess directly to NetworkResourceLoader
Modified: trunk/Source/WebKit2/Shared/ChildProcess.cpp (135019 => 135020)
--- trunk/Source/WebKit2/Shared/ChildProcess.cpp 2012-11-17 01:06:53 UTC (rev 135019)
+++ trunk/Source/WebKit2/Shared/ChildProcess.cpp 2012-11-17 01:34:20 UTC (rev 135020)
@@ -66,9 +66,8 @@
{
// FIXME: The termination timer should not be scheduled on the main run loop.
// It won't work with the threaded mode, but it's not really useful anyway as is.
-#if PLATFORM(MAC)
- disableProcessSuppression(processSuppressionVisibleApplicationReason);
-#endif
+
+ platformInitialize();
}
ChildProcess::~ChildProcess()
@@ -104,5 +103,11 @@
workQueue.dispatchAfterDelay(bind(static_cast<void(*)()>(watchdogCallback)), watchdogDelay);
}
-
+
+#if !PLATFORM(MAC)
+void ChildProcess::platformInitialize()
+{
+}
+#endif
+
} // namespace WebKit
Modified: trunk/Source/WebKit2/Shared/ChildProcess.h (135019 => 135020)
--- trunk/Source/WebKit2/Shared/ChildProcess.h 2012-11-17 01:06:53 UTC (rev 135019)
+++ trunk/Source/WebKit2/Shared/ChildProcess.h 2012-11-17 01:34:20 UTC (rev 135020)
@@ -87,6 +87,8 @@
static NSString * const processSuppressionVisibleApplicationReason;
#endif
+ void platformInitialize();
+
// The timeout, in seconds, before this process will be terminated if termination
// has been enabled. If the timeout is 0 seconds, the process will be terminated immediately.
double m_terminationTimeout;
Modified: trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm (135019 => 135020)
--- trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm 2012-11-17 01:06:53 UTC (rev 135019)
+++ trunk/Source/WebKit2/Shared/mac/ChildProcessMac.mm 2012-11-17 01:34:20 UTC (rev 135020)
@@ -62,4 +62,12 @@
#endif
}
+void ChildProcess::platformInitialize()
+{
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ setpriority(PRIO_DARWIN_PROCESS, 0, 0);
+#endif
+ disableProcessSuppression(processSuppressionVisibleApplicationReason);
}
+
+}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes