| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/debug/debug.h" | 5 #include "src/debug/debug.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1423 Handle<DebugInfo> debug_info(candidates[i]->GetDebugInfo()); | 1423 Handle<DebugInfo> debug_info(candidates[i]->GetDebugInfo()); |
| 1424 FindBreakablePositions(debug_info, start_position, end_position, | 1424 FindBreakablePositions(debug_info, start_position, end_position, |
| 1425 STATEMENT_ALIGNED, positions); | 1425 STATEMENT_ALIGNED, positions); |
| 1426 } | 1426 } |
| 1427 return true; | 1427 return true; |
| 1428 } | 1428 } |
| 1429 UNREACHABLE(); | 1429 UNREACHABLE(); |
| 1430 return false; | 1430 return false; |
| 1431 } | 1431 } |
| 1432 | 1432 |
| 1433 void Debug::RecordAsyncFunction(Handle<JSGeneratorObject> generator_object) { | 1433 void Debug::RecordGenerator(Handle<JSGeneratorObject> generator_object) { |
| 1434 if (last_step_action() <= StepOut) return; | 1434 if (last_step_action() <= StepOut) return; |
| 1435 if (!IsAsyncFunction(generator_object->function()->shared()->kind())) return; | 1435 |
| 1436 if (last_step_action() == StepNext) { |
| 1437 // Only consider this generator a step-next target if not stepping in. |
| 1438 JavaScriptFrameIterator stack_iterator(isolate_); |
| 1439 JavaScriptFrame* frame = stack_iterator.frame(); |
| 1440 if (frame->UnpaddedFP() < thread_local_.target_fp_) return; |
| 1441 } |
| 1442 |
| 1436 DCHECK(!has_suspended_generator()); | 1443 DCHECK(!has_suspended_generator()); |
| 1437 thread_local_.suspended_generator_ = *generator_object; | 1444 thread_local_.suspended_generator_ = *generator_object; |
| 1438 ClearStepping(); | 1445 ClearStepping(); |
| 1439 } | 1446 } |
| 1440 | 1447 |
| 1441 class SharedFunctionInfoFinder { | 1448 class SharedFunctionInfoFinder { |
| 1442 public: | 1449 public: |
| 1443 explicit SharedFunctionInfoFinder(int target_position) | 1450 explicit SharedFunctionInfoFinder(int target_position) |
| 1444 : current_candidate_(NULL), | 1451 : current_candidate_(NULL), |
| 1445 current_candidate_closure_(NULL), | 1452 current_candidate_closure_(NULL), |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2617 } | 2624 } |
| 2618 | 2625 |
| 2619 | 2626 |
| 2620 void LockingCommandMessageQueue::Clear() { | 2627 void LockingCommandMessageQueue::Clear() { |
| 2621 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2628 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 2622 queue_.Clear(); | 2629 queue_.Clear(); |
| 2623 } | 2630 } |
| 2624 | 2631 |
| 2625 } // namespace internal | 2632 } // namespace internal |
| 2626 } // namespace v8 | 2633 } // namespace v8 |
| OLD | NEW |