Title: [169388] trunk/Source/WebKit2
Revision
169388
Author
[email protected]
Date
2014-05-27 10:36:21 -0700 (Tue, 27 May 2014)

Log Message

importance_assertion -> denap_assertion
https://bugs.webkit.org/show_bug.cgi?id=133294

Patch by Gavin Barraclough <[email protected]> on 2014-05-26
Reviewed by Sam Weinig.

Update in accordance with API change. The importance assertion is used on
Mavericks & newer to ensure the WebContent process wakes from AppNap.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::open):
    - MACH_PORT_IMPORTANCE_RECEIVER -> MACH_PORT_DENAP_RECEIVER
* Platform/IPC/mac/ImportanceAssertion.h:
(IPC::ImportanceAssertion::ImportanceAssertion):
(IPC::ImportanceAssertion::~ImportanceAssertion):
    - proc_importance_assertion -> proc_denap_assertion

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (169387 => 169388)


--- trunk/Source/WebKit2/ChangeLog	2014-05-27 17:33:04 UTC (rev 169387)
+++ trunk/Source/WebKit2/ChangeLog	2014-05-27 17:36:21 UTC (rev 169388)
@@ -1,3 +1,21 @@
+2014-05-26  Gavin Barraclough  <[email protected]>
+
+        importance_assertion -> denap_assertion
+        https://bugs.webkit.org/show_bug.cgi?id=133294
+
+        Reviewed by Sam Weinig.
+
+        Update in accordance with API change. The importance assertion is used on
+        Mavericks & newer to ensure the WebContent process wakes from AppNap.
+
+        * Platform/IPC/mac/ConnectionMac.mm:
+        (IPC::Connection::open):
+            - MACH_PORT_IMPORTANCE_RECEIVER -> MACH_PORT_DENAP_RECEIVER
+        * Platform/IPC/mac/ImportanceAssertion.h:
+        (IPC::ImportanceAssertion::ImportanceAssertion):
+        (IPC::ImportanceAssertion::~ImportanceAssertion):
+            - proc_importance_assertion -> proc_denap_assertion
+
 2014-05-27  Jessie Berlin  <[email protected]>
 
         Revert r169362 since it broke the ML build.

Modified: trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm (169387 => 169388)


--- trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm	2014-05-27 17:33:04 UTC (rev 169387)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm	2014-05-27 17:36:21 UTC (rev 169388)
@@ -145,7 +145,9 @@
         // Create the receive port.
         mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &m_receivePort);
 
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+        mach_port_set_attributes(mach_task_self(), m_receivePort, MACH_PORT_DENAP_RECEIVER, (mach_port_info_t)0, 0);
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
         mach_port_set_attributes(mach_task_self(), m_receivePort, MACH_PORT_IMPORTANCE_RECEIVER, (mach_port_info_t)0, 0);
 #endif
 

Modified: trunk/Source/WebKit2/Platform/IPC/mac/ImportanceAssertion.h (169387 => 169388)


--- trunk/Source/WebKit2/Platform/IPC/mac/ImportanceAssertion.h	2014-05-27 17:33:04 UTC (rev 169387)
+++ trunk/Source/WebKit2/Platform/IPC/mac/ImportanceAssertion.h	2014-05-27 17:36:21 UTC (rev 169388)
@@ -44,12 +44,20 @@
     explicit ImportanceAssertion(mach_msg_header_t* header)
         : m_assertion(0)
     {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+        proc_denap_assertion_begin_with_msg(header, &m_assertion);
+#else
         proc_importance_assertion_begin_with_msg(header, 0, &m_assertion);
+#endif
     }
 
     ~ImportanceAssertion()
     {
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
+        proc_denap_assertion_complete(m_assertion);
+#else
         proc_importance_assertion_complete(m_assertion);
+#endif
     }
 
 private:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to