Title: [167622] trunk/Source/WebKit2
- Revision
- 167622
- Author
- [email protected]
- Date
- 2014-04-21 14:00:49 -0700 (Mon, 21 Apr 2014)
Log Message
Don't use ProcessAssertion on simulator
https://bugs.webkit.org/show_bug.cgi?id=131950
Rubber stamped by Benjamin Poulain
* UIProcess/ios/ProcessAssertion.mm:
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (167621 => 167622)
--- trunk/Source/WebKit2/ChangeLog 2014-04-21 20:44:59 UTC (rev 167621)
+++ trunk/Source/WebKit2/ChangeLog 2014-04-21 21:00:49 UTC (rev 167622)
@@ -1,3 +1,14 @@
+2014-04-21 Gavin Barraclough <[email protected]>
+
+ Don't use ProcessAssertion on simulator
+ https://bugs.webkit.org/show_bug.cgi?id=131950
+
+ Rubber stamped by Benjamin Poulain
+
+ * UIProcess/ios/ProcessAssertion.mm:
+ (WebKit::ProcessAssertion::ProcessAssertion):
+ (WebKit::ProcessAssertion::setState):
+
2014-04-21 Anders Carlsson <[email protected]>
Another build fix.
Modified: trunk/Source/WebKit2/UIProcess/ios/ProcessAssertion.mm (167621 => 167622)
--- trunk/Source/WebKit2/UIProcess/ios/ProcessAssertion.mm 2014-04-21 20:44:59 UTC (rev 167621)
+++ trunk/Source/WebKit2/UIProcess/ios/ProcessAssertion.mm 2014-04-21 21:00:49 UTC (rev 167622)
@@ -32,9 +32,21 @@
namespace WebKit {
+#if PLATFORM(IOS_SIMULATOR)
+
+ProcessAssertion::ProcessAssertion(pid_t, AssertionState)
+{
+}
+
+void ProcessAssertion::setState(AssertionState)
+{
+}
+
+#else
+
const BKSProcessAssertionFlags backgroundTabFlags = (BKSProcessAssertionAllowIdleSleep);
const BKSProcessAssertionFlags foregroundTabFlags = (BKSProcessAssertionAllowIdleSleep | BKSProcessAssertionPreventTaskSuspend | BKSProcessAssertionAllowSuspendOnSleep | BKSProcessAssertionWantsForegroundResourcePriority | BKSProcessAssertionPreventTaskThrottleDown);
-
+
ProcessAssertion::ProcessAssertion(pid_t pid, AssertionState assertionState)
{
BKSProcessAssertionAcquisitionHandler handler = ^(BOOL acquired) {
@@ -43,12 +55,12 @@
ASSERT_NOT_REACHED();
}
};
-
+
BKSProcessAssertionFlags flags = (assertionState == AssertionState::Foreground) ? foregroundTabFlags : backgroundTabFlags;
m_assertionState = assertionState;
m_assertion = adoptNS([[BKSProcessAssertion alloc] initWithPID:pid flags:flags reason:BKSProcessAssertionReasonExtension name:@"Web content visible" withHandler:handler]);
}
-
+
void ProcessAssertion::setState(AssertionState assertionState)
{
if (m_assertionState == assertionState)
@@ -59,6 +71,8 @@
[m_assertion setFlags:flags];
}
+#endif
+
}
#endif // PLATFORM(IOS) && USE(XPC_SERVICES)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes