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/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 9125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9136 i::Handle<i::Object> value(script->source(), isolate); | 9136 i::Handle<i::Object> value(script->source(), isolate); |
9137 if (!value->IsString()) return MaybeLocal<String>(); | 9137 if (!value->IsString()) return MaybeLocal<String>(); |
9138 return Utils::ToLocal( | 9138 return Utils::ToLocal( |
9139 handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value))); | 9139 handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value))); |
9140 } | 9140 } |
9141 | 9141 |
9142 bool debug::Script::IsWasm() const { | 9142 bool debug::Script::IsWasm() const { |
9143 return Utils::OpenHandle(this)->type() == i::Script::TYPE_WASM; | 9143 return Utils::OpenHandle(this)->type() == i::Script::TYPE_WASM; |
9144 } | 9144 } |
9145 | 9145 |
| 9146 bool debug::Script::IsModule() const { |
| 9147 return Utils::OpenHandle(this)->origin_options().IsModule(); |
| 9148 } |
| 9149 |
9146 namespace { | 9150 namespace { |
9147 int GetSmiValue(i::Handle<i::FixedArray> array, int index) { | 9151 int GetSmiValue(i::Handle<i::FixedArray> array, int index) { |
9148 return i::Smi::cast(array->get(index))->value(); | 9152 return i::Smi::cast(array->get(index))->value(); |
9149 } | 9153 } |
9150 } // namespace | 9154 } // namespace |
9151 | 9155 |
9152 bool debug::Script::GetPossibleBreakpoints( | 9156 bool debug::Script::GetPossibleBreakpoints( |
9153 const debug::Location& start, const debug::Location& end, | 9157 const debug::Location& start, const debug::Location& end, |
9154 std::vector<debug::Location>* locations) const { | 9158 std::vector<debug::Location>* locations) const { |
9155 CHECK(!start.IsEmpty()); | 9159 CHECK(!start.IsEmpty()); |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10055 Address callback_address = | 10059 Address callback_address = |
10056 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10060 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10057 VMState<EXTERNAL> state(isolate); | 10061 VMState<EXTERNAL> state(isolate); |
10058 ExternalCallbackScope call_scope(isolate, callback_address); | 10062 ExternalCallbackScope call_scope(isolate, callback_address); |
10059 callback(info); | 10063 callback(info); |
10060 } | 10064 } |
10061 | 10065 |
10062 | 10066 |
10063 } // namespace internal | 10067 } // namespace internal |
10064 } // namespace v8 | 10068 } // namespace v8 |
OLD | NEW |