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

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

Issue 15764004: DevTools: show extension name in console context switcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: correct rebaseline Created 6 years, 4 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/InspectorRuntimeAgent.cpp
diff --git a/Source/core/inspector/InspectorRuntimeAgent.cpp b/Source/core/inspector/InspectorRuntimeAgent.cpp
index 7dadc08cabbc5fe698a0a3dd72aaf3f91a731d3c..42c5c16c7997db07e9aeee8d404190c0dfc99fda 100644
--- a/Source/core/inspector/InspectorRuntimeAgent.cpp
+++ b/Source/core/inspector/InspectorRuntimeAgent.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "core/inspector/InspectorRuntimeAgent.h"
+#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ScriptDebugServer.h"
#include "bindings/core/v8/ScriptState.h"
#include "core/inspector/InjectedScript.h"
@@ -211,14 +212,17 @@ void InspectorRuntimeAgent::disable(ErrorString* errorString)
m_state->setBoolean(InspectorRuntimeAgentState::runtimeEnabled, false);
}
-void InspectorRuntimeAgent::addExecutionContextToFrontend(ScriptState* scriptState, bool isPageContext, const String& name, const String& frameId)
+void InspectorRuntimeAgent::addExecutionContextToFrontend(ScriptState* scriptState, bool isPageContext, const String& origin, const String& frameId)
{
int executionContextId = injectedScriptManager()->injectedScriptIdFor(scriptState);
m_scriptStateToId.set(scriptState, executionContextId);
+ DOMWrapperWorld& world = scriptState->world();
+ String humanReadableName = world.isIsolatedWorld() ? world.isolatedWorldHumanReadableName() : "";
m_frontend->executionContextCreated(ExecutionContextDescription::create()
.setId(executionContextId)
.setIsPageContext(isPageContext)
- .setName(name)
+ .setName(humanReadableName)
+ .setOrigin(origin)
.setFrameId(frameId)
.release());
}

Powered by Google App Engine
This is Rietveld 408576698