| Index: Source/bindings/v8/ScriptDebugServer.cpp
|
| diff --git a/Source/bindings/v8/ScriptDebugServer.cpp b/Source/bindings/v8/ScriptDebugServer.cpp
|
| index 7db4eb02cd996383b0388890019af6ea2843f27a..ba28f7372024919fda2f06fe8e9f1385bba5e037 100644
|
| --- a/Source/bindings/v8/ScriptDebugServer.cpp
|
| +++ b/Source/bindings/v8/ScriptDebugServer.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "DebuggerScriptSource.h"
|
| #include "V8JavaScriptCallFrame.h"
|
| #include "bindings/v8/ScopedPersistent.h"
|
| +#include "bindings/v8/ScriptCallStackFactory.h"
|
| #include "bindings/v8/ScriptController.h"
|
| #include "bindings/v8/ScriptObject.h"
|
| #include "bindings/v8/ScriptSourceCode.h"
|
| @@ -600,7 +601,7 @@ bool ScriptDebugServer::isPaused()
|
| return !m_executionState.isEmpty();
|
| }
|
|
|
| -void ScriptDebugServer::compileScript(ScriptState* scriptState, const String& expression, const String& sourceURL, String* scriptId, String* exceptionMessage, int* lineNumber, int* columnNumber)
|
| +void ScriptDebugServer::compileScript(ScriptState* scriptState, const String& expression, const String& sourceURL, String* scriptId, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtr<ScriptCallStack>* stackTrace)
|
| {
|
| if (scriptState->contextIsEmpty())
|
| return;
|
| @@ -612,11 +613,10 @@ void ScriptDebugServer::compileScript(ScriptState* scriptState, const String& ex
|
| if (tryCatch.HasCaught()) {
|
| v8::Local<v8::Message> message = tryCatch.Message();
|
| if (!message.IsEmpty()) {
|
| - *exceptionMessage = toCoreStringWithUndefinedOrNullCheck(message->Get());
|
| - if (lineNumber)
|
| - *lineNumber = message->GetLineNumber();
|
| - if (columnNumber)
|
| - *columnNumber = message->GetStartColumn();
|
| + *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message->Get());
|
| + *lineNumber = message->GetLineNumber();
|
| + *columnNumber = message->GetStartColumn();
|
| + *stackTrace = createScriptCallStack(message->GetStackTrace(), ScriptCallStack::maxCallStackSizeToCapture, m_isolate);
|
| }
|
| return;
|
| }
|
| @@ -632,7 +632,7 @@ void ScriptDebugServer::clearCompiledScripts()
|
| m_compiledScripts.clear();
|
| }
|
|
|
| -void ScriptDebugServer::runScript(ScriptState* scriptState, const String& scriptId, ScriptValue* result, bool* wasThrown, String* exceptionMessage, int* lineNumber, int* columnNumber)
|
| +void ScriptDebugServer::runScript(ScriptState* scriptState, const String& scriptId, ScriptValue* result, bool* wasThrown, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtr<ScriptCallStack>* stackTrace)
|
| {
|
| if (!m_compiledScripts.contains(scriptId))
|
| return;
|
| @@ -654,11 +654,10 @@ void ScriptDebugServer::runScript(ScriptState* scriptState, const String& script
|
| *result = ScriptValue(scriptState, tryCatch.Exception());
|
| v8::Local<v8::Message> message = tryCatch.Message();
|
| if (!message.IsEmpty()) {
|
| - *exceptionMessage = toCoreStringWithUndefinedOrNullCheck(message->Get());
|
| - if (lineNumber)
|
| - *lineNumber = message->GetLineNumber();
|
| - if (columnNumber)
|
| - *columnNumber = message->GetStartColumn();
|
| + *exceptionDetailsText = toCoreStringWithUndefinedOrNullCheck(message->Get());
|
| + *lineNumber = message->GetLineNumber();
|
| + *columnNumber = message->GetStartColumn();
|
| + *stackTrace = createScriptCallStack(message->GetStackTrace(), ScriptCallStack::maxCallStackSizeToCapture, m_isolate);
|
| }
|
| } else {
|
| *result = ScriptValue(scriptState, value);
|
|
|