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

Side by Side Diff: Source/core/inspector/PageRuntimeAgent.cpp

Issue 884753003: Fix template angle bracket syntax in inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Some more fixes Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('k') | Source/core/inspector/PromiseTracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 FrameConsole::mute(); 145 FrameConsole::mute();
146 } 146 }
147 147
148 void PageRuntimeAgent::unmuteConsole() 148 void PageRuntimeAgent::unmuteConsole()
149 { 149 {
150 FrameConsole::unmute(); 150 FrameConsole::unmute();
151 } 151 }
152 152
153 void PageRuntimeAgent::reportExecutionContextCreation() 153 void PageRuntimeAgent::reportExecutionContextCreation()
154 { 154 {
155 Vector<std::pair<ScriptState*, SecurityOrigin*> > isolatedContexts; 155 Vector<std::pair<ScriptState*, SecurityOrigin*>> isolatedContexts;
156 for (Frame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree ().traverseNext()) { 156 for (Frame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree ().traverseNext()) {
157 if (!frame->isLocalFrame()) 157 if (!frame->isLocalFrame())
158 continue; 158 continue;
159 LocalFrame* localFrame = toLocalFrame(frame); 159 LocalFrame* localFrame = toLocalFrame(frame);
160 if (!localFrame->script().canExecuteScripts(NotAboutToExecuteScript)) 160 if (!localFrame->script().canExecuteScripts(NotAboutToExecuteScript))
161 continue; 161 continue;
162 String frameId = m_pageAgent->frameId(localFrame); 162 String frameId = m_pageAgent->frameId(localFrame);
163 163
164 // Ensure execution context is created. 164 // Ensure execution context is created.
165 // If initializeMainWorld returns true, then is registered by didCreateS criptContext 165 // If initializeMainWorld returns true, then is registered by didCreateS criptContext
166 if (!localFrame->script().initializeMainWorld()) 166 if (!localFrame->script().initializeMainWorld())
167 addExecutionContextToFrontend(ScriptState::forMainWorld(localFrame), true, "", frameId); 167 addExecutionContextToFrontend(ScriptState::forMainWorld(localFrame), true, "", frameId);
168 localFrame->script().collectIsolatedContexts(isolatedContexts); 168 localFrame->script().collectIsolatedContexts(isolatedContexts);
169 if (isolatedContexts.isEmpty()) 169 if (isolatedContexts.isEmpty())
170 continue; 170 continue;
171 for (const auto& pair : isolatedContexts) { 171 for (const auto& pair : isolatedContexts) {
172 String originString = pair.second ? pair.second->toRawString() : ""; 172 String originString = pair.second ? pair.second->toRawString() : "";
173 addExecutionContextToFrontend(pair.first, false, originString, frame Id); 173 addExecutionContextToFrontend(pair.first, false, originString, frame Id);
174 } 174 }
175 isolatedContexts.clear(); 175 isolatedContexts.clear();
176 } 176 }
177 } 177 }
178 178
179 } // namespace blink 179 } // namespace blink
180 180
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.cpp ('k') | Source/core/inspector/PromiseTracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698