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

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

Issue 15764004: DevTools: show extension name in console context switcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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/core/inspector/PageRuntimeAgent.cpp
diff --git a/Source/core/inspector/PageRuntimeAgent.cpp b/Source/core/inspector/PageRuntimeAgent.cpp
index 86280ce459d95c0ceba78fc96e8748047b21de7f..2c7f021102520a44f5b41de7a773c2a8906adfe5 100644
--- a/Source/core/inspector/PageRuntimeAgent.cpp
+++ b/Source/core/inspector/PageRuntimeAgent.cpp
@@ -181,7 +181,12 @@ void PageRuntimeAgent::notifyContextCreated(const String& frameId, ScriptState*
{
ASSERT(securityOrigin || isPageContext);
int executionContextId = injectedScriptManager()->injectedScriptIdFor(scriptState);
- String name = securityOrigin ? securityOrigin->toRawString() : "";
+ v8::HandleScope handleScope;
yurys 2013/05/24 04:58:44 We try to avoid using v8 API from the agents direc
+ DOMWrapperWorld* world = DOMWrapperWorld::isolatedWorld(scriptState->context());
+ String name = world ? world->isolatedWorldHumanReadableName() : "";
+ if (name.isEmpty() && securityOrigin)
+ name = securityOrigin->toRawString();
+
m_frontend->executionContextCreated(ExecutionContextDescription::create()
.setId(executionContextId)
.setIsPageContext(isPageContext)
« Source/bindings/v8/DOMWrapperWorld.cpp ('K') | « Source/bindings/v8/DOMWrapperWorld.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698