summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jsc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/jsc.cpp')
-rw-r--r--Source/JavaScriptCore/jsc.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp
index 00ad5d3b2..17ab51588 100644
--- a/Source/JavaScriptCore/jsc.cpp
+++ b/Source/JavaScriptCore/jsc.cpp
@@ -84,6 +84,7 @@ static bool fillBufferWithContentsOfFile(const UString& fileName, Vector<char>&
static EncodedJSValue JSC_HOST_CALL functionPrint(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionDebug(ExecState*);
+static EncodedJSValue JSC_HOST_CALL functionDescribe(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionJSCStack(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionGC(ExecState*);
#ifndef NDEBUG
@@ -191,6 +192,7 @@ protected:
Base::finishCreation(globalData);
addFunction(globalData, "debug", functionDebug, 1);
+ addFunction(globalData, "describe", functionDescribe, 1);
addFunction(globalData, "print", functionPrint, 1);
addFunction(globalData, "quit", functionQuit, 0);
addFunction(globalData, "gc", functionGC, 0);
@@ -298,6 +300,12 @@ EncodedJSValue JSC_HOST_CALL functionDebug(ExecState* exec)
return JSValue::encode(jsUndefined());
}
+EncodedJSValue JSC_HOST_CALL functionDescribe(ExecState* exec)
+{
+ fprintf(stderr, "--> %s\n", exec->argument(0).description());
+ return JSValue::encode(jsUndefined());
+}
+
EncodedJSValue JSC_HOST_CALL functionJSCStack(ExecState* exec)
{
String trace = "--> Stack trace:\n";