Index: Source/bindings/v8/ScriptDebugServer.cpp |
diff --git a/Source/bindings/v8/ScriptDebugServer.cpp b/Source/bindings/v8/ScriptDebugServer.cpp |
index 482840a76ee9cc26600258d54bf3d3c1becf30b2..abdbf622bbbb6fa36c912a029884d0200db92f0c 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,21 @@ bool ScriptDebugServer::setScriptSource(const String& sourceID, const String& ne |
return false; |
} |
+int ScriptDebugServer::frameCount() |
+{ |
+ v8::Handle<v8::Value> result; |
+ if (m_executionState.IsEmpty()) { |
+ v8::Handle<v8::Function> frameCountFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.newLocal(m_isolate)->Get(v8AtomicString(m_isolate, "frameCount"))); |
yurys
2014/06/03 13:19:43
AFAIU this branch is unused so I'd rather put an A
aandrey
2014/06/04 08:51:27
Done.
|
+ result = v8::Debug::Call(frameCountFunction); |
+ } else { |
+ v8::Handle<v8::Value> argv[] = { m_executionState }; |
+ 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; |