| Index: Source/bindings/v8/ScriptDebugServer.cpp
|
| diff --git a/Source/bindings/v8/ScriptDebugServer.cpp b/Source/bindings/v8/ScriptDebugServer.cpp
|
| index 0c61ce7494e9737c677e1026a26de1b3585053ff..0c809b3a7a499fdf0dec13d83179014d9566d2d4 100644
|
| --- a/Source/bindings/v8/ScriptDebugServer.cpp
|
| +++ b/Source/bindings/v8/ScriptDebugServer.cpp
|
| @@ -241,7 +241,7 @@ void ScriptDebugServer::stepOutOfFunction()
|
| continueProgram();
|
| }
|
|
|
| -bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, RefPtr<TypeBuilder::Debugger::SetScriptSourceError>& errorData, StackTrace* newCallFrames, RefPtr<JSONObject>* result)
|
| +bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, RefPtr<TypeBuilder::Debugger::SetScriptSourceError>& errorData, StackTraces* newCallFrames, RefPtr<JSONObject>* result)
|
| {
|
| class EnableLiveEditScope {
|
| public:
|
| @@ -287,8 +287,8 @@ bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& ne
|
| if (jsonResult)
|
| *result = jsonResult->asObject();
|
| // Call stack may have changed after if the edited function was on the stack.
|
| - if (!preview && isPaused())
|
| - *newCallFrames = currentCallFrames();
|
| + if (!preview && isAnyScriptPaused())
|
| + newCallFrames->add(currentCallFrames());
|
| return true;
|
| }
|
| // Compile error.
|
| @@ -342,27 +342,28 @@ PassRefPtrWillBeRawPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(in
|
| return JavaScriptCallFrame::create(v8::Debug::GetDebugContext(), v8::Handle<v8::Object>::Cast(currentCallFrameV8));
|
| }
|
|
|
| -StackTrace ScriptDebugServer::currentCallFramesInner(ScopeInfoDetails scopeDetails)
|
| +StackTraces ScriptDebugServer::currentCallFramesInner(ScopeInfoDetails scopeDetails)
|
| {
|
| if (!m_isolate->InContext())
|
| - return StackTrace(ScriptValue());
|
| + return StackTraces();
|
| v8::HandleScope handleScope(m_isolate);
|
|
|
| RefPtrWillBeRawPtr<JavaScriptCallFrame> currentCallFrame = wrapCallFrames(0, scopeDetails);
|
| if (!currentCallFrame)
|
| - return StackTrace(ScriptValue());
|
| + return StackTraces();
|
|
|
| V8ScriptState* scriptState = m_pausedScriptState ? m_pausedScriptState->v8ScriptState() : V8ScriptState::current(m_isolate);
|
| V8ScriptState::Scope scope(scriptState);
|
| - return StackTrace(ScriptValue(scriptState, toV8(currentCallFrame.release(), scriptState->context()->Global(), m_isolate)));
|
| + return StackTraces(StackTrace(ScriptValue(scriptState, toV8(currentCallFrame.release(), scriptState->context()->Global(), m_isolate))), scriptState);
|
| }
|
|
|
| -StackTrace ScriptDebugServer::currentCallFrames()
|
| +
|
| +StackTraces ScriptDebugServer::currentCallFrames()
|
| {
|
| return currentCallFramesInner(AllScopes);
|
| }
|
|
|
| -StackTrace ScriptDebugServer::currentCallFramesForAsyncStack()
|
| +StackTraces ScriptDebugServer::currentCallFramesForAsyncStack()
|
| {
|
| return currentCallFramesInner(FastAsyncScopes);
|
| }
|
| @@ -426,7 +427,8 @@ void ScriptDebugServer::handleProgramBreak(ScriptState* pausedScriptState, v8::H
|
|
|
| m_pausedScriptState = pausedScriptState;
|
| m_executionState = executionState;
|
| - ScriptDebugListener::SkipPauseRequest result = listener->didPause(pausedScriptState, currentCallFrames(), ScriptValue(pausedScriptState->v8ScriptState(), exception), breakpointIds);
|
| +
|
| + ScriptDebugListener::SkipPauseRequest result = listener->didPause(pausedScriptState, ScriptValue(pausedScriptState->v8ScriptState(), exception), breakpointIds);
|
| if (result == ScriptDebugListener::NoSkip) {
|
| m_runningNestedMessageLoop = true;
|
| runMessageLoopOnPause(pausedScriptState->v8ScriptState()->context());
|
|
|