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

Side by Side Diff: src/inspector/v8-debugger-agent-impl.cc

Issue 2740623002: [inspector] added length for scriptParsed notification (Closed)
Patch Set: better Created 3 years, 9 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/inspector/v8-debugger-agent-impl.h" 5 #include "src/inspector/v8-debugger-agent-impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/debug/debug-interface.h" 9 #include "src/debug/debug-interface.h"
10 #include "src/inspector/injected-script.h" 10 #include "src/inspector/injected-script.h"
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 std::move(executionContextAuxData)); 1134 std::move(executionContextAuxData));
1135 const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr; 1135 const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr;
1136 const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr; 1136 const bool* hasSourceURLParam = hasSourceURL ? &hasSourceURL : nullptr;
1137 const bool* isModuleParam = isModule ? &isModule : nullptr; 1137 const bool* isModuleParam = isModule ? &isModule : nullptr;
1138 if (success) 1138 if (success)
1139 m_frontend.scriptParsed( 1139 m_frontend.scriptParsed(
1140 scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), 1140 scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(),
1141 scriptRef->endLine(), scriptRef->endColumn(), contextId, 1141 scriptRef->endLine(), scriptRef->endColumn(), contextId,
1142 scriptRef->hash(), std::move(executionContextAuxDataParam), 1142 scriptRef->hash(), std::move(executionContextAuxDataParam),
1143 isLiveEditParam, std::move(sourceMapURLParam), hasSourceURLParam, 1143 isLiveEditParam, std::move(sourceMapURLParam), hasSourceURLParam,
1144 isModuleParam); 1144 isModuleParam, scriptRef->source().length());
1145 else 1145 else
1146 m_frontend.scriptFailedToParse( 1146 m_frontend.scriptFailedToParse(
1147 scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), 1147 scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(),
1148 scriptRef->endLine(), scriptRef->endColumn(), contextId, 1148 scriptRef->endLine(), scriptRef->endColumn(), contextId,
1149 scriptRef->hash(), std::move(executionContextAuxDataParam), 1149 scriptRef->hash(), std::move(executionContextAuxDataParam),
1150 std::move(sourceMapURLParam), hasSourceURLParam, isModuleParam); 1150 std::move(sourceMapURLParam), hasSourceURLParam, isModuleParam,
1151 scriptRef->source().length());
1151 1152
1152 if (scriptURL.isEmpty() || !success) return; 1153 if (scriptURL.isEmpty() || !success) return;
1153 1154
1154 protocol::DictionaryValue* breakpointsCookie = 1155 protocol::DictionaryValue* breakpointsCookie =
1155 m_state->getObject(DebuggerAgentState::javaScriptBreakpoints); 1156 m_state->getObject(DebuggerAgentState::javaScriptBreakpoints);
1156 if (!breakpointsCookie) return; 1157 if (!breakpointsCookie) return;
1157 1158
1158 for (size_t i = 0; i < breakpointsCookie->size(); ++i) { 1159 for (size_t i = 0; i < breakpointsCookie->size(); ++i) {
1159 auto cookie = breakpointsCookie->at(i); 1160 auto cookie = breakpointsCookie->at(i);
1160 protocol::DictionaryValue* breakpointObject = 1161 protocol::DictionaryValue* breakpointObject =
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 void V8DebuggerAgentImpl::reset() { 1340 void V8DebuggerAgentImpl::reset() {
1340 if (!enabled()) return; 1341 if (!enabled()) return;
1341 m_scheduledDebuggerStep = NoStep; 1342 m_scheduledDebuggerStep = NoStep;
1342 m_blackboxedPositions.clear(); 1343 m_blackboxedPositions.clear();
1343 resetBlackboxedStateCache(); 1344 resetBlackboxedStateCache();
1344 m_scripts.clear(); 1345 m_scripts.clear();
1345 m_breakpointIdToDebuggerBreakpointIds.clear(); 1346 m_breakpointIdToDebuggerBreakpointIds.clear();
1346 } 1347 }
1347 1348
1348 } // namespace v8_inspector 1349 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698