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

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: 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 eb3bdca51e988e5f6fe010e0796467fb0d186217..a0875b4693ade0a7e116dcc702865875353a4bcf 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"
@@ -200,14 +201,16 @@ 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);
+ String humanReadableName = scriptState->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