From 815f1ed417bd26fbe2abbdf20ac5d3423b30796c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 23 Jul 2012 09:28:44 +0200 Subject: Imported WebKit commit e65cbc5b6ac32627c797e7fc7f46eb7794410c92 (http://svn.webkit.org/repository/webkit/trunk@123308) New snapshot with better configure tests --- Source/JavaScriptCore/jsc.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Source/JavaScriptCore/jsc.cpp') diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp index 5f3dbdb99..00ad5d3b2 100644 --- a/Source/JavaScriptCore/jsc.cpp +++ b/Source/JavaScriptCore/jsc.cpp @@ -88,6 +88,7 @@ static EncodedJSValue JSC_HOST_CALL functionJSCStack(ExecState*); static EncodedJSValue JSC_HOST_CALL functionGC(ExecState*); #ifndef NDEBUG static EncodedJSValue JSC_HOST_CALL functionReleaseExecutableMemory(ExecState*); +static EncodedJSValue JSC_HOST_CALL functionDumpCallFrame(ExecState*); #endif static EncodedJSValue JSC_HOST_CALL functionVersion(ExecState*); static EncodedJSValue JSC_HOST_CALL functionRun(ExecState*); @@ -194,6 +195,7 @@ protected: addFunction(globalData, "quit", functionQuit, 0); addFunction(globalData, "gc", functionGC, 0); #ifndef NDEBUG + addFunction(globalData, "dumpCallFrame", functionDumpCallFrame, 0); addFunction(globalData, "releaseExecutableMemory", functionReleaseExecutableMemory, 0); #endif addFunction(globalData, "version", functionVersion, 1); @@ -281,6 +283,15 @@ EncodedJSValue JSC_HOST_CALL functionPrint(ExecState* exec) return JSValue::encode(jsUndefined()); } +#ifndef NDEBUG +EncodedJSValue JSC_HOST_CALL functionDumpCallFrame(ExecState* exec) +{ + if (!exec->callerFrame()->hasHostCallFrameFlag()) + exec->globalData().interpreter->dumpCallFrame(exec->callerFrame()); + return JSValue::encode(jsUndefined()); +} +#endif + EncodedJSValue JSC_HOST_CALL functionDebug(ExecState* exec) { fprintf(stderr, "--> %s\n", exec->argument(0).toString(exec)->value(exec).utf8().data()); -- cgit v1.2.1