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

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

Issue 2150333003: [DevTools] Compatibility with old STL libraries (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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 ErrorString error; 208 ErrorString error;
209 209
210 int pauseState = V8DebuggerImpl::DontPauseOnExceptions; 210 int pauseState = V8DebuggerImpl::DontPauseOnExceptions;
211 m_state->getInteger(DebuggerAgentState::pauseOnExceptionsState, &pauseState) ; 211 m_state->getInteger(DebuggerAgentState::pauseOnExceptionsState, &pauseState) ;
212 setPauseOnExceptionsImpl(&error, pauseState); 212 setPauseOnExceptionsImpl(&error, pauseState);
213 DCHECK(error.isEmpty()); 213 DCHECK(error.isEmpty());
214 214
215 m_skipAllPauses = m_state->booleanProperty(DebuggerAgentState::skipAllPauses , false); 215 m_skipAllPauses = m_state->booleanProperty(DebuggerAgentState::skipAllPauses , false);
216 216
217 int asyncCallStackDepth = 0; 217 int asyncCallStackDepth = 0;
218 m_state->getInteger(DebuggerAgentState::asyncCallStackDepth, &asyncCallStack Depth); 218 m_state->getInteger(DebuggerAgentState::pauseOnExceptionsState, &pauseState) ;
pfeldman 2016/07/15 23:14:07 Why did this change?
eostroukhov-old 2016/07/15 23:45:53 Oops, it didn't.
219 m_debugger->setAsyncCallStackDepth(this, asyncCallStackDepth); 219 m_debugger->setAsyncCallStackDepth(this, asyncCallStackDepth);
220 220
221 String16 blackboxPattern; 221 String16 blackboxPattern;
222 if (m_state->getString(DebuggerAgentState::blackboxPattern, &blackboxPattern )) { 222 if (m_state->getString(DebuggerAgentState::blackboxPattern, &blackboxPattern )) {
223 if (!setBlackboxPattern(&error, blackboxPattern)) 223 if (!setBlackboxPattern(&error, blackboxPattern))
224 NOTREACHED(); 224 NOTREACHED();
225 } 225 }
226 } 226 }
227 227
228 void V8DebuggerAgentImpl::setBreakpointsActive(ErrorString* errorString, bool ac tive) 228 void V8DebuggerAgentImpl::setBreakpointsActive(ErrorString* errorString, bool ac tive)
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 if (m_blackboxPattern) { 438 if (m_blackboxPattern) {
439 const String16& scriptSourceURL = it->second->sourceURL(); 439 const String16& scriptSourceURL = it->second->sourceURL();
440 if (!scriptSourceURL.isEmpty() && m_blackboxPattern->match(scriptSourceU RL) != -1) 440 if (!scriptSourceURL.isEmpty() && m_blackboxPattern->match(scriptSourceU RL) != -1)
441 return true; 441 return true;
442 } 442 }
443 auto itBlackboxedPositions = m_blackboxedPositions.find(String16::fromIntege r(frame->sourceID())); 443 auto itBlackboxedPositions = m_blackboxedPositions.find(String16::fromIntege r(frame->sourceID()));
444 if (itBlackboxedPositions == m_blackboxedPositions.end()) 444 if (itBlackboxedPositions == m_blackboxedPositions.end())
445 return false; 445 return false;
446 446
447 const std::vector<std::pair<int, int>>& ranges = itBlackboxedPositions->seco nd; 447 const std::vector<std::pair<int, int>>& ranges = itBlackboxedPositions->seco nd;
448 auto itRange = std::lower_bound(ranges.cbegin(), ranges.cend(), 448 auto itRange = std::lower_bound(ranges.begin(), ranges.end(),
449 std::make_pair(frame->line(), frame->column()), positionComparator); 449 std::make_pair(frame->line(), frame->column()), positionComparator);
450 // Ranges array contains positions in script where blackbox state is changed . 450 // Ranges array contains positions in script where blackbox state is changed .
451 // [(0,0) ... ranges[0]) isn't blackboxed, [ranges[0] ... ranges[1]) is blac kboxed... 451 // [(0,0) ... ranges[0]) isn't blackboxed, [ranges[0] ... ranges[1]) is blac kboxed...
452 return std::distance(ranges.begin(), itRange) % 2; 452 return std::distance(ranges.begin(), itRange) % 2;
453 } 453 }
454 454
455 V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::shouldSkipExceptionPa use(JavaScriptCallFrame* topCallFrame) 455 V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::shouldSkipExceptionPa use(JavaScriptCallFrame* topCallFrame)
456 { 456 {
457 if (m_steppingFromFramework) 457 if (m_steppingFromFramework)
458 return RequestNoSkip; 458 return RequestNoSkip;
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 { 1181 {
1182 if (!enabled()) 1182 if (!enabled())
1183 return; 1183 return;
1184 m_scheduledDebuggerStep = NoStep; 1184 m_scheduledDebuggerStep = NoStep;
1185 m_scripts.clear(); 1185 m_scripts.clear();
1186 m_blackboxedPositions.clear(); 1186 m_blackboxedPositions.clear();
1187 m_breakpointIdToDebuggerBreakpointIds.clear(); 1187 m_breakpointIdToDebuggerBreakpointIds.clear();
1188 } 1188 }
1189 1189
1190 } // namespace blink 1190 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698