X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/1df5f87f1309a8daa30dabdee855f48ae40d14ab..6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174:/runtime/TimeoutChecker.cpp diff --git a/runtime/TimeoutChecker.cpp b/runtime/TimeoutChecker.cpp index 81a096a..2798dac 100644 --- a/runtime/TimeoutChecker.cpp +++ b/runtime/TimeoutChecker.cpp @@ -38,11 +38,7 @@ #elif OS(WINDOWS) #include #else -#include "CurrentTime.h" -#endif - -#if PLATFORM(BREWMP) -#include +#include #endif using namespace std; @@ -84,18 +80,6 @@ static inline unsigned getCPUTime() GetThreadTimes(GetCurrentThread(), &creationTime, &exitTime, &kernelTime.fileTime, &userTime.fileTime); return userTime.fileTimeAsLong / 10000 + kernelTime.fileTimeAsLong / 10000; -#elif OS(SYMBIAN) - RThread current; - TTimeIntervalMicroSeconds cpuTime; - - TInt err = current.GetCpuTime(cpuTime); - ASSERT_WITH_MESSAGE(err == KErrNone, "GetCpuTime failed with %d", err); - return cpuTime.Int64() / 1000; -#elif PLATFORM(BREWMP) - // This function returns a continuously and linearly increasing millisecond - // timer from the time the device was powered on. - // There is only one thread in BREW, so this is enough. - return GETUPTIMEMS(); #else // FIXME: We should return the time the current thread has spent executing. @@ -145,11 +129,11 @@ bool TimeoutChecker::didTimeOut(ExecState* exec) if (m_ticksUntilNextCheck == 0) m_ticksUntilNextCheck = ticksUntilFirstCheck; - if (exec->dynamicGlobalObject()->shouldInterruptScriptBeforeTimeout()) + if (exec->dynamicGlobalObject()->globalObjectMethodTable()->shouldInterruptScriptBeforeTimeout(exec->dynamicGlobalObject())) return true; if (m_timeoutInterval && m_timeExecuting > m_timeoutInterval) { - if (exec->dynamicGlobalObject()->shouldInterruptScript()) + if (exec->dynamicGlobalObject()->globalObjectMethodTable()->shouldInterruptScript(exec->dynamicGlobalObject())) return true; reset();