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

Unified Diff: Source/bindings/core/v8/MainThreadDebugger.cpp

Issue 1225763002: Remove debugger id, use local frame id instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/core/v8/MainThreadDebugger.cpp
diff --git a/Source/bindings/core/v8/MainThreadDebugger.cpp b/Source/bindings/core/v8/MainThreadDebugger.cpp
index 6c7f017214848d4c4641a164056c4e0957958acb..7646b0d63361d0ef1dfd81c5e8e811044a0f620b 100644
--- a/Source/bindings/core/v8/MainThreadDebugger.cpp
+++ b/Source/bindings/core/v8/MainThreadDebugger.cpp
@@ -97,13 +97,14 @@ DEFINE_TRACE(MainThreadDebugger)
ScriptDebuggerBase::trace(visitor);
}
-void MainThreadDebugger::setContextDebugData(v8::Local<v8::Context> context, const String& type, int contextDebugId)
+void MainThreadDebugger::setContextDebugData(v8::Local<v8::Context> context, const String& type, LocalFrame* frame)
{
- String debugData = "[" + type + "," + String::number(contextDebugId) + "]";
+ LocalFrame* localFrameRoot = frame->localFrameRoot();
+ String debugData = "[" + type + "," + String::number(WeakIdentifierMap<LocalFrame>::identifier(localFrameRoot)) + "]";
V8Debugger::setContextDebugData(context, debugData);
}
-void MainThreadDebugger::addListener(ScriptDebugListener* listener, LocalFrame* localFrameRoot, int contextDebugId)
+void MainThreadDebugger::addListener(ScriptDebugListener* listener, LocalFrame* localFrameRoot)
{
ASSERT(localFrameRoot == localFrameRoot->localFrameRoot());
@@ -114,7 +115,7 @@ void MainThreadDebugger::addListener(ScriptDebugListener* listener, LocalFrame*
if (m_listenersMap.isEmpty())
debugger()->enable();
m_listenersMap.set(localFrameRoot, listener);
- String contextDataSubstring = "," + String::number(contextDebugId) + "]";
+ String contextDataSubstring = "," + String::number(WeakIdentifierMap<LocalFrame>::identifier(localFrameRoot)) + "]";
debugger()->reportCompiledScripts(contextDataSubstring, listener);
}

Powered by Google App Engine
This is Rietveld 408576698