summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore')
-rw-r--r--Source/JavaScriptCore/parser/Parser.cpp10
-rw-r--r--Source/JavaScriptCore/runtime/TimeoutChecker.h12
-rw-r--r--Source/JavaScriptCore/wtf/Assertions.cpp8
-rw-r--r--Source/JavaScriptCore/wtf/Platform.h5
4 files changed, 11 insertions, 24 deletions
diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp
index dc15e4f..fc1e986 100644
--- a/Source/JavaScriptCore/parser/Parser.cpp
+++ b/Source/JavaScriptCore/parser/Parser.cpp
@@ -27,17 +27,10 @@
#include "JSParser.h"
#include "Lexer.h"
-#ifdef ANDROID_INSTRUMENT
-#include "TimeCounter.h"
-#endif
-
namespace JSC {
void Parser::parse(JSGlobalData* globalData, FunctionParameters* parameters, JSParserStrictness strictness, JSParserMode mode, int* errLine, UString* errMsg)
{
-#ifdef ANDROID_INSTRUMENT
- android::TimeCounter::start(android::TimeCounter::JavaScriptParseTimeCounter);
-#endif
ASSERT(globalData);
m_sourceElements = 0;
@@ -65,9 +58,6 @@ void Parser::parse(JSGlobalData* globalData, FunctionParameters* parameters, JSP
*errMsg = parseError ? parseError : "Parse error";
m_sourceElements = 0;
}
-#ifdef ANDROID_INSTRUMENT
- android::TimeCounter::record(android::TimeCounter::JavaScriptParseTimeCounter, __FUNCTION__);
-#endif
}
void Parser::didFinishParsing(SourceElements* sourceElements, ParserArenaData<DeclarationStacks::VarStack>* varStack,
diff --git a/Source/JavaScriptCore/runtime/TimeoutChecker.h b/Source/JavaScriptCore/runtime/TimeoutChecker.h
index 71ce169..5925641 100644
--- a/Source/JavaScriptCore/runtime/TimeoutChecker.h
+++ b/Source/JavaScriptCore/runtime/TimeoutChecker.h
@@ -31,10 +31,6 @@
#include <wtf/Assertions.h>
-#ifdef ANDROID_INSTRUMENT
-#include "TimeCounter.h"
-#endif
-
namespace JSC {
class ExecState;
@@ -52,10 +48,6 @@ namespace JSC {
{
if (!m_startCount)
reset();
-#ifdef ANDROID_INSTRUMENT
- if (!m_startCount)
- android::TimeCounter::start(android::TimeCounter::JavaScriptTimeCounter);
-#endif
++m_startCount;
}
@@ -63,10 +55,6 @@ namespace JSC {
{
ASSERT(m_startCount);
--m_startCount;
-#ifdef ANDROID_INSTRUMENT
- if (!m_startCount)
- android::TimeCounter::record(android::TimeCounter::JavaScriptTimeCounter, __FUNCTION__);
-#endif
}
void reset();
diff --git a/Source/JavaScriptCore/wtf/Assertions.cpp b/Source/JavaScriptCore/wtf/Assertions.cpp
index 930368c..0642414 100644
--- a/Source/JavaScriptCore/wtf/Assertions.cpp
+++ b/Source/JavaScriptCore/wtf/Assertions.cpp
@@ -66,6 +66,10 @@
#include <execinfo.h>
#endif
+#if OS(ANDROID)
+#include <utils/Log.h>
+#endif
+
extern "C" {
#if PLATFORM(BREWMP)
@@ -124,7 +128,9 @@ static void vprintf_stderr_common(const char* format, va_list args)
vsnprintf(buffer.data(), size, format, args);
printLog(buffer);
}
-
+#elif OS(ANDROID)
+ LOG_PRI_VA(ANDROID_LOG_DEBUG, "WebKit", format, args);
+ return;
#elif HAVE(ISDEBUGGERPRESENT)
if (IsDebuggerPresent()) {
size_t size = 1024;
diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h
index e92af89..d7cd222 100644
--- a/Source/JavaScriptCore/wtf/Platform.h
+++ b/Source/JavaScriptCore/wtf/Platform.h
@@ -676,7 +676,10 @@
#if PLATFORM(ANDROID)
#define WEBCORE_NAVIGATOR_VENDOR "Google Inc."
-#define LOG_DISABLED 1
+// Force LOG_ERROR() to be enabled in all builds. All other logging and
+// assertions are enabled in debug builds only.
+#define ERROR_DISABLED 0
+
// This must be defined before we include FastMalloc.h in config.h.
#define USE_SYSTEM_MALLOC 1