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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
802 // At least one active break point now. | 802 // At least one active break point now. |
803 return debug_info->GetBreakPointCount() > 0; | 803 return debug_info->GetBreakPointCount() > 0; |
804 } | 804 } |
805 | 805 |
806 | 806 |
807 bool Debug::SetBreakPointForScript(Handle<Script> script, | 807 bool Debug::SetBreakPointForScript(Handle<Script> script, |
808 Handle<Object> break_point_object, | 808 Handle<Object> break_point_object, |
809 int* source_position, | 809 int* source_position, |
810 BreakPositionAlignment alignment) { | 810 BreakPositionAlignment alignment) { |
811 if (script->type() == Script::TYPE_WASM) { | 811 if (script->type() == Script::TYPE_WASM) { |
812 // TODO(clemensh): set breakpoint for wasm. | 812 return wasm::GetDebugInfo(JSObject::cast(script->wasm_object())) |
813 ->SetBreakPoint(*source_position); | |
Yang
2016/06/17 18:16:31
The reason we pass in a pointer for source_positio
Clemens Hammacher
2016/06/24 15:12:33
No, the called function just returned false.
I thu
| |
813 } | 814 } |
814 HandleScope scope(isolate_); | 815 HandleScope scope(isolate_); |
815 | 816 |
816 // Obtain shared function info for the function. | 817 // Obtain shared function info for the function. |
817 Handle<Object> result = | 818 Handle<Object> result = |
818 FindSharedFunctionInfoInScript(script, *source_position); | 819 FindSharedFunctionInfoInScript(script, *source_position); |
819 if (result->IsUndefined(isolate_)) return false; | 820 if (result->IsUndefined(isolate_)) return false; |
820 | 821 |
821 // Make sure the function has set up the debug info. | 822 // Make sure the function has set up the debug info. |
822 Handle<SharedFunctionInfo> shared = Handle<SharedFunctionInfo>::cast(result); | 823 Handle<SharedFunctionInfo> shared = Handle<SharedFunctionInfo>::cast(result); |
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2617 } | 2618 } |
2618 | 2619 |
2619 | 2620 |
2620 void LockingCommandMessageQueue::Clear() { | 2621 void LockingCommandMessageQueue::Clear() { |
2621 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2622 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2622 queue_.Clear(); | 2623 queue_.Clear(); |
2623 } | 2624 } |
2624 | 2625 |
2625 } // namespace internal | 2626 } // namespace internal |
2626 } // namespace v8 | 2627 } // namespace v8 |
OLD | NEW |