Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: Source/bindings/core/dart/DartScriptDebugServer.cpp

Issue 575883003: Fix more inspector compile errors from merge as well as a ScriptState compile error. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/dart/DartScriptDebugServer.h ('k') | Source/bindings/core/dart/DartScriptState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
{
« no previous file with comments | « Source/bindings/core/dart/DartScriptDebugServer.h ('k') | Source/bindings/core/dart/DartScriptState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698