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

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: removing v8 api from agent code 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..aed88cd41b797151c0b929aa9f4319c942e0586f 100644
--- a/Source/core/inspector/PageRuntimeAgent.cpp
+++ b/Source/core/inspector/PageRuntimeAgent.cpp
@@ -181,7 +181,11 @@ void PageRuntimeAgent::notifyContextCreated(const String& frameId, ScriptState*
{
ASSERT(securityOrigin || isPageContext);
int executionContextId = injectedScriptManager()->injectedScriptIdFor(scriptState);
- String name = securityOrigin ? securityOrigin->toRawString() : "";
+ DOMWrapperWorld* world = scriptState->domWrapperWorld();
+ 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/ScriptState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698