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

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

Issue 301983003: Make Inspector aware of RemoteFrames in FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: yurys' review comment addressed Created 6 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 435cfb8b8bacb87e6a7c84f89256366a8e17901a..97987168cd29596678b7890bd8a8e17942843bba 100644
--- a/Source/core/inspector/PageRuntimeAgent.cpp
+++ b/Source/core/inspector/PageRuntimeAgent.cpp
@@ -130,14 +130,17 @@ void PageRuntimeAgent::unmuteConsole()
void PageRuntimeAgent::reportExecutionContextCreation()
{
Vector<std::pair<ScriptState*, SecurityOrigin*> > isolatedContexts;
- for (LocalFrame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (!frame->script().canExecuteScripts(NotAboutToExecuteScript))
+ for (Frame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (!frame->isLocalFrame())
continue;
- String frameId = m_pageAgent->frameId(frame);
+ LocalFrame* localFrame = toLocalFrame(frame);
+ if (!localFrame->script().canExecuteScripts(NotAboutToExecuteScript))
+ continue;
+ String frameId = m_pageAgent->frameId(localFrame);
- ScriptState* scriptState = ScriptState::forMainWorld(frame);
+ ScriptState* scriptState = ScriptState::forMainWorld(localFrame);
addExecutionContextToFrontend(scriptState, true, "", frameId);
- frame->script().collectIsolatedContexts(isolatedContexts);
+ localFrame->script().collectIsolatedContexts(isolatedContexts);
if (isolatedContexts.isEmpty())
continue;
for (size_t i = 0; i< isolatedContexts.size(); i++)
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.cpp ('k') | Source/modules/filesystem/InspectorFileSystemAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698