Title: [216558] trunk/Source/_javascript_Core
- Revision
- 216558
- Author
- mark....@apple.com
- Date
- 2017-05-09 17:03:10 -0700 (Tue, 09 May 2017)
Log Message
Unindent some code in Watchdog::shouldTerminate().
https://bugs.webkit.org/show_bug.cgi?id=171896
Rubber stamped by Keith Miller.
I should have done this before I landed r213107, but I forgot. Unindenting it now.
* runtime/Watchdog.cpp:
(JSC::Watchdog::shouldTerminate):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (216557 => 216558)
--- trunk/Source/_javascript_Core/ChangeLog 2017-05-09 23:27:53 UTC (rev 216557)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-05-10 00:03:10 UTC (rev 216558)
@@ -1,3 +1,15 @@
+2017-05-09 Mark Lam <mark....@apple.com>
+
+ Unindent some code in Watchdog::shouldTerminate().
+ https://bugs.webkit.org/show_bug.cgi?id=171896
+
+ Rubber stamped by Keith Miller.
+
+ I should have done this before I landed r213107, but I forgot. Unindenting it now.
+
+ * runtime/Watchdog.cpp:
+ (JSC::Watchdog::shouldTerminate):
+
2017-05-09 Michael Saboff <msab...@apple.com>
Cap the number of FTL compilation threads on iOS to 2
Modified: trunk/Source/_javascript_Core/runtime/Watchdog.cpp (216557 => 216558)
--- trunk/Source/_javascript_Core/runtime/Watchdog.cpp 2017-05-09 23:27:53 UTC (rev 216557)
+++ trunk/Source/_javascript_Core/runtime/Watchdog.cpp 2017-05-10 00:03:10 UTC (rev 216558)
@@ -69,21 +69,18 @@
bool Watchdog::shouldTerminate(ExecState* exec)
{
ASSERT(m_vm->currentThreadIsHoldingAPILock());
- // FIXME: Will unindent the following before landing. Leaving indented for now to minimize the code diff.
- {
- if (currentWallClockTime() < m_wallClockDeadline)
- return false; // Just a stale timer firing. Nothing to do.
+ if (currentWallClockTime() < m_wallClockDeadline)
+ return false; // Just a stale timer firing. Nothing to do.
- // Set m_wallClockDeadline to noTimeLimit here so that we can reject all future
- // spurious wakes.
- m_wallClockDeadline = noTimeLimit;
+ // Set m_wallClockDeadline to noTimeLimit here so that we can reject all future
+ // spurious wakes.
+ m_wallClockDeadline = noTimeLimit;
- auto cpuTime = currentCPUTime();
- if (cpuTime < m_cpuDeadline) {
- auto remainingCPUTime = m_cpuDeadline - cpuTime;
- startTimer(remainingCPUTime);
- return false;
- }
+ auto cpuTime = currentCPUTime();
+ if (cpuTime < m_cpuDeadline) {
+ auto remainingCPUTime = m_cpuDeadline - cpuTime;
+ startTimer(remainingCPUTime);
+ return false;
}
// Note: we should not be holding the lock while calling the callbacks. The callbacks may
@@ -96,23 +93,21 @@
if (needsTermination)
return true;
- // FIXME: Will unindent the following before landing. Leaving indented for now to minimize the code diff.
- {
- // If we get here, then the callback above did not want to terminate execution. As a
- // result, the callback may have done one of the following:
- // 1. cleared the time limit (i.e. watchdog is disabled),
- // 2. set a new time limit via Watchdog::setTimeLimit(), or
- // 3. did nothing (i.e. allow another cycle of the current time limit).
- //
- // In the case of 1, we don't have to do anything.
- // In the case of 2, Watchdog::setTimeLimit() would already have started the timer.
- // In the case of 3, we need to re-start the timer here.
+ // If we get here, then the callback above did not want to terminate execution. As a
+ // result, the callback may have done one of the following:
+ // 1. cleared the time limit (i.e. watchdog is disabled),
+ // 2. set a new time limit via Watchdog::setTimeLimit(), or
+ // 3. did nothing (i.e. allow another cycle of the current time limit).
+ //
+ // In the case of 1, we don't have to do anything.
+ // In the case of 2, Watchdog::setTimeLimit() would already have started the timer.
+ // In the case of 3, we need to re-start the timer here.
- ASSERT(m_hasEnteredVM);
- bool callbackAlreadyStartedTimer = (m_cpuDeadline != noTimeLimit);
- if (hasTimeLimit() && !callbackAlreadyStartedTimer)
- startTimer(m_timeLimit);
- }
+ ASSERT(m_hasEnteredVM);
+ bool callbackAlreadyStartedTimer = (m_cpuDeadline != noTimeLimit);
+ if (hasTimeLimit() && !callbackAlreadyStartedTimer)
+ startTimer(m_timeLimit);
+
return false;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes