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

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

Issue 2215153002: [DevTools] Eliminate frameId and isContentScript from js protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: navigation tracker Created 4 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: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
index 004a393c5f2b93a5e92434e3c77f4e1adcc2c990..16d1cfe514cca27ae65ce181a0f886468dd8e7fe 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
@@ -61,6 +61,7 @@
#include "core/xml/XPathEvaluator.h"
#include "core/xml/XPathResult.h"
#include "platform/UserGestureIndicator.h"
+#include "platform/inspector_protocol/Values.h"
#include "platform/v8_inspector/public/V8Inspector.h"
#include "wtf/PtrUtil.h"
#include "wtf/ThreadingPrimitives.h"
@@ -145,7 +146,15 @@ void MainThreadDebugger::contextCreated(ScriptState* scriptState, LocalFrame* fr
ASSERT(isMainThread());
v8::HandleScope handles(scriptState->isolate());
DOMWrapperWorld& world = scriptState->world();
- v8Inspector()->contextCreated(V8ContextInfo(scriptState->context(), contextGroupId(frame), world.isMainWorld(), origin ? origin->toRawString() : "", world.isIsolatedWorld() ? world.isolatedWorldHumanReadableName() : "", IdentifiersFactory::frameId(frame), scriptState->getExecutionContext()->isDocument()));
+ std::unique_ptr<protocol::DictionaryValue> auxData = protocol::DictionaryValue::create();
+ auxData->setBoolean("isDefault", world.isMainWorld());
+ auxData->setString("frameId", IdentifiersFactory::frameId(frame));
+ V8ContextInfo contextInfo(scriptState->context(), contextGroupId(frame), world.isIsolatedWorld() ? world.isolatedWorldHumanReadableName() : "");
+ if (origin)
+ contextInfo.origin = origin->toRawString();
+ contextInfo.auxData = auxData->toJSONString();
+ contextInfo.hasMemoryOnConsole = scriptState->getExecutionContext()->isDocument();
+ v8Inspector()->contextCreated(contextInfo);
}
void MainThreadDebugger::contextWillBeDestroyed(ScriptState* scriptState)

Powered by Google App Engine
This is Rietveld 408576698