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

Unified Diff: Source/core/inspector/MainThreadDebugger.cpp

Issue 1225763002: Remove debugger id, use local frame id instead. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased 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
« no previous file with comments | « Source/core/inspector/MainThreadDebugger.h ('k') | Source/core/inspector/PageDebuggerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/MainThreadDebugger.cpp
diff --git a/Source/core/inspector/MainThreadDebugger.cpp b/Source/core/inspector/MainThreadDebugger.cpp
index 9bf85c660edd05ddd2296f415e8004b51eb8708e..a4de58f17136b2df6ace51616348f133c48f380f 100644
--- a/Source/core/inspector/MainThreadDebugger.cpp
+++ b/Source/core/inspector/MainThreadDebugger.cpp
@@ -97,13 +97,18 @@ DEFINE_TRACE(MainThreadDebugger)
ScriptDebuggerBase::trace(visitor);
}
-void MainThreadDebugger::setContextDebugData(v8::Local<v8::Context> context, const String& type, int contextDebugId)
+void MainThreadDebugger::initializeContext(v8::Local<v8::Context> context, int worldId)
{
- String debugData = "[" + type + "," + String::number(contextDebugId) + "]";
+ LocalFrame* frame = retrieveFrameWithGlobalObjectCheck(context);
+ if (!frame)
+ return;
+ LocalFrame* localFrameRoot = frame->localFrameRoot();
+ String type = worldId == MainWorldId ? "page" : "injected";
+ 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 +119,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)) + "]";
Vector<ScriptDebugListener::ParsedScript> compiledScripts;
debugger()->getCompiledScripts(contextDataSubstring, compiledScripts);
for (size_t i = 0; i < compiledScripts.size(); i++)
« no previous file with comments | « Source/core/inspector/MainThreadDebugger.h ('k') | Source/core/inspector/PageDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698