| OLD | NEW |
| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |