diff options
author | Grace Kloba <> | 2009-04-10 18:40:31 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-10 18:40:31 -0700 |
commit | 6ec2227da5903a060e0d76f41e21f263ea4c2764 (patch) | |
tree | eaa775452421b0f56d062a3f501ba10df2295a9f /JavaScriptCore/runtime | |
parent | 8f72e70a9fd78eec56623b3a62e68f16b7b27e28 (diff) | |
download | external_webkit-6ec2227da5903a060e0d76f41e21f263ea4c2764.zip external_webkit-6ec2227da5903a060e0d76f41e21f263ea4c2764.tar.gz external_webkit-6ec2227da5903a060e0d76f41e21f263ea4c2764.tar.bz2 |
AI 145799: Added back the ANDROID_INSTRUMENT for JS.
Automated import of CL 145799
Diffstat (limited to 'JavaScriptCore/runtime')
-rw-r--r-- | JavaScriptCore/runtime/TimeoutChecker.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/JavaScriptCore/runtime/TimeoutChecker.h b/JavaScriptCore/runtime/TimeoutChecker.h index 7bfa6d0..18bc36b 100644 --- a/JavaScriptCore/runtime/TimeoutChecker.h +++ b/JavaScriptCore/runtime/TimeoutChecker.h @@ -31,6 +31,10 @@ #include <wtf/Assertions.h> +#ifdef ANDROID_INSTRUMENT +#include "TimeCounter.h" +#endif + namespace JSC { class ExecState; @@ -47,6 +51,10 @@ namespace JSC { { if (!m_startCount) reset(); +#ifdef ANDROID_INSTRUMENT + if (!m_startCount) + android::TimeCounter::start(android::TimeCounter::JavaScriptTimeCounter); +#endif ++m_startCount; } @@ -54,6 +62,10 @@ namespace JSC { { ASSERT(m_startCount); --m_startCount; +#ifdef ANDROID_INSTRUMENT + if (!m_startCount) + android::TimeCounter::record(android::TimeCounter::JavaScriptTimeCounter, __FUNCTION__); +#endif } void reset(); |