Changeset 215223 in webkit for trunk/Source/JavaScriptCore/runtime/JSRunLoopTimer.cpp
- Timestamp:
- Apr 11, 2017, 2:34:36 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSRunLoopTimer.cpp
r215088 r215223 162 162 m_isScheduled = false; 163 163 } 164 164 165 #else 166 167 const Seconds JSRunLoopTimer::s_decade { 60 * 60 * 24 * 365 * 10 }; 168 165 169 JSRunLoopTimer::JSRunLoopTimer(VM* vm) 166 170 : m_vm(vm) 171 , m_apiLock(&vm->apiLock()) 172 , m_timer(RunLoop::current(), this, &JSRunLoopTimer::timerDidFire) 167 173 { 174 m_timer.startOneShot(s_decade); 168 175 } 169 176 … … 172 179 } 173 180 174 void JSRunLoopTimer::scheduleTimer(double )181 void JSRunLoopTimer::scheduleTimer(double intervalInSeconds) 175 182 { 183 m_timer.startOneShot(intervalInSeconds); 184 m_isScheduled = true; 176 185 } 177 186 178 187 void JSRunLoopTimer::cancelTimer() 179 188 { 189 m_timer.startOneShot(s_decade); 190 m_isScheduled = false; 180 191 } 192 181 193 #endif 182 194 183 195 } // namespace JSC
Note:
See TracChangeset
for help on using the changeset viewer.