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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp

Issue 2125423002: [DevTools] Rename ScriptPosition.line|column into lineNumber|columnNumber (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium 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 "platform/v8_inspector/V8DebuggerAgentImpl.h" 5 #include "platform/v8_inspector/V8DebuggerAgentImpl.h"
6 6
7 #include "platform/inspector_protocol/String16.h" 7 #include "platform/inspector_protocol/String16.h"
8 #include "platform/inspector_protocol/Values.h" 8 #include "platform/inspector_protocol/Values.h"
9 #include "platform/v8_inspector/InjectedScript.h" 9 #include "platform/v8_inspector/InjectedScript.h"
10 #include "platform/v8_inspector/InspectedContext.h" 10 #include "platform/v8_inspector/InspectedContext.h"
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 902
903 if (!inPositions->length()) { 903 if (!inPositions->length()) {
904 m_blackboxedPositions.erase(scriptId); 904 m_blackboxedPositions.erase(scriptId);
905 return; 905 return;
906 } 906 }
907 907
908 std::vector<std::pair<int, int>> positions; 908 std::vector<std::pair<int, int>> positions;
909 positions.reserve(inPositions->length()); 909 positions.reserve(inPositions->length());
910 for (size_t i = 0; i < inPositions->length(); ++i) { 910 for (size_t i = 0; i < inPositions->length(); ++i) {
911 protocol::Debugger::ScriptPosition* position = inPositions->get(i); 911 protocol::Debugger::ScriptPosition* position = inPositions->get(i);
912 if (position->getLine() < 0) { 912 if (position->getLineNumber() < 0) {
913 *error = "Position missing 'line' or 'line' < 0."; 913 *error = "Position missing 'line' or 'line' < 0.";
914 return; 914 return;
915 } 915 }
916 if (position->getColumn() < 0) { 916 if (position->getColumnNumber() < 0) {
917 *error = "Position missing 'column' or 'column' < 0."; 917 *error = "Position missing 'column' or 'column' < 0.";
918 return; 918 return;
919 } 919 }
920 positions.push_back(std::make_pair(position->getLine(), position->getCol umn())); 920 positions.push_back(std::make_pair(position->getLineNumber(), position-> getColumnNumber()));
921 } 921 }
922 922
923 for (size_t i = 1; i < positions.size(); ++i) { 923 for (size_t i = 1; i < positions.size(); ++i) {
924 if (positions[i - 1].first < positions[i].first) 924 if (positions[i - 1].first < positions[i].first)
925 continue; 925 continue;
926 if (positions[i - 1].first == positions[i].first && positions[i - 1].sec ond < positions[i].second) 926 if (positions[i - 1].first == positions[i].first && positions[i - 1].sec ond < positions[i].second)
927 continue; 927 continue;
928 *error = "Input positions array is not sorted or contains duplicate valu es."; 928 *error = "Input positions array is not sorted or contains duplicate valu es.";
929 return; 929 return;
930 } 930 }
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 { 1242 {
1243 if (!enabled()) 1243 if (!enabled())
1244 return; 1244 return;
1245 m_scheduledDebuggerStep = NoStep; 1245 m_scheduledDebuggerStep = NoStep;
1246 m_scripts.clear(); 1246 m_scripts.clear();
1247 m_blackboxedPositions.clear(); 1247 m_blackboxedPositions.clear();
1248 m_breakpointIdToDebuggerBreakpointIds.clear(); 1248 m_breakpointIdToDebuggerBreakpointIds.clear();
1249 } 1249 }
1250 1250
1251 } // namespace blink 1251 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698