Index: Source/bindings/core/dart/DartScriptDebugServer.cpp |
diff --git a/Source/bindings/core/dart/DartScriptDebugServer.cpp b/Source/bindings/core/dart/DartScriptDebugServer.cpp |
index 318fb843e6ada049295ed9410a2d70a9fa52af7a..2366c932dbcb328561c2ed099d7c0dc30e6f9b8d 100644 |
--- a/Source/bindings/core/dart/DartScriptDebugServer.cpp |
+++ b/Source/bindings/core/dart/DartScriptDebugServer.cpp |
@@ -308,7 +308,7 @@ void DartPageDebug::dispatchDidParseSource(intptr_t libraryId, Dart_Handle scrip |
script.isContentScript = false; |
script.language = String("Dart"); |
script.libraryId = libraryId; |
- m_listener->didParseSource(sourceID, script); |
+ m_listener->didParseSource(sourceID, script, CompileResult::CompileSuccess); |
} |
String DartPageDebug::getScriptId(const String& url) |
@@ -689,13 +689,22 @@ int DartScriptDebugServer::frameCount() |
StackTrace DartScriptDebugServer::currentCallFrames() |
{ |
- return StackTrace(m_executionState); |
+ return StackTrace(m_executionState, DartUtilities::currentScriptState()); |
} |
StackTrace DartScriptDebugServer::currentCallFramesForAsyncStack() |
{ |
// FIXMEDART: implement propertly. These are the regular not Async call frames. |
- return StackTrace(m_executionState); |
+ return StackTrace(m_executionState, DartUtilities::currentScriptState()); |
+} |
+ |
+ScriptCallFrame DartScriptDebugServer::callFrameNoScopes(int index) |
+{ |
+ if (!isPaused()) |
+ return ScriptCallFrame(); |
+ DartIsolateScope scope(m_pausedIsolate); |
+ DartApiScope apiScope; |
+ return getScriptCallFrameHelper(index); |
} |
bool DartScriptDebugServer::isPaused() |
@@ -1075,17 +1084,10 @@ void DartScriptDebugServer::runScript(ScriptState* scriptState, const String& sc |
{ |
} |
- |
-ScriptCallFrame DartScriptDebugServer::topCallFrameNoScopes() |
+ScriptCallFrame DartScriptDebugServer::getScriptCallFrameHelper(int frameIndex) |
{ |
- if (!isPaused()) |
- return ScriptCallFrame(); |
- DartIsolateScope scope(m_pausedIsolate); |
- DartApiScope apiScope; |
- |
- // FIXME: move this to a shared helper method. |
Dart_ActivationFrame frame = 0; |
- Dart_Handle result = Dart_GetActivationFrame(0, 0, &frame); |
+ Dart_Handle result = Dart_GetActivationFrame(0, frameIndex, &frame); |
ASSERT(!Dart_IsError(result)); |
if (Dart_IsError(result)) return ScriptCallFrame(); |
Dart_Handle functionName = 0; |
@@ -1105,6 +1107,15 @@ ScriptCallFrame DartScriptDebugServer::topCallFrameNoScopes() |
return ScriptCallFrame(functionString, getScriptId(url, Dart_CurrentIsolate()), url, line - 1, column - 1, false); |
} |
+ScriptCallFrame DartScriptDebugServer::topCallFrameNoScopes() |
+{ |
+ if (!isPaused()) |
+ return ScriptCallFrame(); |
+ DartIsolateScope scope(m_pausedIsolate); |
+ DartApiScope apiScope; |
+ return getScriptCallFrameHelper(0); |
+} |
+ |
UnifiedScriptDebugServer::UnifiedScriptDebugServer(DartScriptDebugServer* dartScriptDebugServer, PageScriptDebugServer* scriptDebugServer) |
{ |
m_v8 = scriptDebugServer; |
@@ -1258,6 +1269,13 @@ StackTrace UnifiedScriptDebugServer::currentCallFramesForAsyncStack() |
return m_dart->currentCallFramesForAsyncStack(); |
} |
+ScriptCallFrame UnifiedScriptDebugServer::callFrameNoScopes(int index) |
+{ |
+ if (m_v8->isPaused()) |
+ return m_v8->callFrameNoScopes(index); |
+ |
+ return m_dart->callFrameNoScopes(index); |
+} |
bool UnifiedScriptDebugServer::isPaused() |
{ |