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

Unified Diff: Source/bindings/v8/ScriptDebugServer.cpp

Issue 309013005: DevTools: Event listener breakpoint should not stop if happened inside framework. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: one more test Created 6 years, 7 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
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;

Powered by Google App Engine
This is Rietveld 408576698