Index: Source/bindings/v8/ScriptDebugServer.cpp |
diff --git a/Source/bindings/v8/ScriptDebugServer.cpp b/Source/bindings/v8/ScriptDebugServer.cpp |
index 482840a76ee9cc26600258d54bf3d3c1becf30b2..d88dc13d998fa61b6e3920ac8a492fb6b52c891e 100644 |
--- a/Source/bindings/v8/ScriptDebugServer.cpp |
+++ b/Source/bindings/v8/ScriptDebugServer.cpp |
@@ -168,8 +168,7 @@ void ScriptDebugServer::setPauseOnExceptionsState(PauseOnExceptionsState pauseOn |
void ScriptDebugServer::setPauseOnNextStatement(bool pause) |
{ |
- if (isPaused()) |
- return; |
+ ASSERT(!isPaused()); |
if (pause) |
v8::Debug::DebugBreak(m_isolate); |
else |
@@ -314,6 +313,17 @@ bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& ne |
return false; |
} |
+int ScriptDebugServer::frameCount() |
+{ |
+ ASSERT(isPaused()); |
+ ASSERT(!m_executionState.IsEmpty()); |
+ v8::Handle<v8::Value> argv[] = { m_executionState }; |
+ v8::Handle<v8::Value> result = callDebuggerMethod("frameCount", WTF_ARRAY_LENGTH(argv), argv); |
+ if (result->IsInt32()) |
+ return result->Int32Value(); |
+ return 0; |
+} |
+ |
PassRefPtr<JavaScriptCallFrame> ScriptDebugServer::wrapCallFrames(int maximumLimit, ScopeInfoDetails scopeDetails) |
{ |
const int scopeBits = 2; |