Changeset 19534 in webkit for trunk/JavaScriptCore/kjs/interpreter.h
- Timestamp:
- Feb 9, 2007, 11:28:02 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/interpreter.h
r18461 r19534 37 37 class SavedBuiltins; 38 38 class ScopeChain; 39 class TimeoutChecker;40 39 41 40 /** … … 47 46 class Interpreter { 48 47 friend class Collector; 49 friend class TimeoutChecker;50 48 public: 51 49 /** … … 315 313 void startTimeoutCheck(); 316 314 void stopTimeoutCheck(); 317 318 void pauseTimeoutCheck(); 319 void resumeTimeoutCheck(); 320 321 bool checkTimeout(); 315 316 bool timedOut(); 322 317 323 318 void ref() { ++m_refCount; } … … 329 324 virtual bool shouldInterruptScript() const { return true; } 330 325 331 longm_timeoutTime;326 unsigned m_timeoutTime; 332 327 333 328 private: 334 bool handleTimeout();329 bool checkTimeout(); 335 330 void init(); 336 331 void resetTimeoutCheck(); 332 337 333 /** 338 334 * This constructor is not implemented, in order to prevent … … 367 363 CompatMode m_compatMode; 368 364 369 TimeoutChecker* m_timeoutChecker; 370 bool m_timedOut; 371 372 unsigned m_startTimeoutCheckCount; 373 unsigned m_pauseTimeoutCheckCount; 365 unsigned m_timeAtLastCheckTimeout; 366 unsigned m_timeExecuting; 367 unsigned m_timeoutCheckCount; 368 369 unsigned m_tickCount; 370 unsigned m_ticksUntilNextTimeoutCheck; 374 371 375 372 ProtectedPtr<JSObject> m_Object; … … 408 405 }; 409 406 410 inline bool Interpreter:: checkTimeout()407 inline bool Interpreter::timedOut() 411 408 { 412 if (!m_timedOut) 413 return false; 414 415 return handleTimeout(); 409 m_tickCount++; 410 411 if (m_tickCount != m_ticksUntilNextTimeoutCheck) 412 return false; 413 414 return checkTimeout(); 416 415 } 417 416
Note:
See TracChangeset
for help on using the changeset viewer.