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 "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 // Update PCs on the stack to point to recompiled code. | 1393 // Update PCs on the stack to point to recompiled code. |
1394 RedirectActiveFunctions redirect_visitor(*shared); | 1394 RedirectActiveFunctions redirect_visitor(*shared); |
1395 redirect_visitor.VisitThread(isolate_, isolate_->thread_local_top()); | 1395 redirect_visitor.VisitThread(isolate_, isolate_->thread_local_top()); |
1396 isolate_->thread_manager()->IterateArchivedThreads(&redirect_visitor); | 1396 isolate_->thread_manager()->IterateArchivedThreads(&redirect_visitor); |
1397 | 1397 |
1398 return true; | 1398 return true; |
1399 } | 1399 } |
1400 | 1400 |
1401 void Debug::RecordAsyncFunction(Handle<JSGeneratorObject> generator_object) { | 1401 void Debug::RecordAsyncFunction(Handle<JSGeneratorObject> generator_object) { |
1402 if (last_step_action() <= StepOut) return; | 1402 if (last_step_action() <= StepOut) return; |
| 1403 if (!generator_object->function()->shared()->is_async()) return; |
1403 DCHECK(!has_suspended_generator()); | 1404 DCHECK(!has_suspended_generator()); |
1404 DCHECK(generator_object->function()->shared()->is_async()); | |
1405 thread_local_.suspended_generator_ = *generator_object; | 1405 thread_local_.suspended_generator_ = *generator_object; |
1406 ClearStepping(); | 1406 ClearStepping(); |
1407 } | 1407 } |
1408 | 1408 |
1409 class SharedFunctionInfoFinder { | 1409 class SharedFunctionInfoFinder { |
1410 public: | 1410 public: |
1411 explicit SharedFunctionInfoFinder(int target_position) | 1411 explicit SharedFunctionInfoFinder(int target_position) |
1412 : current_candidate_(NULL), | 1412 : current_candidate_(NULL), |
1413 current_candidate_closure_(NULL), | 1413 current_candidate_closure_(NULL), |
1414 current_start_position_(RelocInfo::kNoPosition), | 1414 current_start_position_(RelocInfo::kNoPosition), |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2610 } | 2610 } |
2611 | 2611 |
2612 | 2612 |
2613 void LockingCommandMessageQueue::Clear() { | 2613 void LockingCommandMessageQueue::Clear() { |
2614 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2614 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2615 queue_.Clear(); | 2615 queue_.Clear(); |
2616 } | 2616 } |
2617 | 2617 |
2618 } // namespace internal | 2618 } // namespace internal |
2619 } // namespace v8 | 2619 } // namespace v8 |
OLD | NEW |