| 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 9681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9692 debug::ConsoleCallArguments::ConsoleCallArguments( | 9692 debug::ConsoleCallArguments::ConsoleCallArguments( |
| 9693 const v8::FunctionCallbackInfo<v8::Value>& info) | 9693 const v8::FunctionCallbackInfo<v8::Value>& info) |
| 9694 : v8::FunctionCallbackInfo<v8::Value>(nullptr, info.values_, info.length_) { | 9694 : v8::FunctionCallbackInfo<v8::Value>(nullptr, info.values_, info.length_) { |
| 9695 } | 9695 } |
| 9696 | 9696 |
| 9697 debug::ConsoleCallArguments::ConsoleCallArguments( | 9697 debug::ConsoleCallArguments::ConsoleCallArguments( |
| 9698 internal::BuiltinArguments& args) | 9698 internal::BuiltinArguments& args) |
| 9699 : v8::FunctionCallbackInfo<v8::Value>(nullptr, &args[0] - 1, | 9699 : v8::FunctionCallbackInfo<v8::Value>(nullptr, &args[0] - 1, |
| 9700 args.length() - 1) {} | 9700 args.length() - 1) {} |
| 9701 | 9701 |
| 9702 int debug::GetStackFrameId(v8::Local<v8::StackFrame> frame) { |
| 9703 return Utils::OpenHandle(*frame)->id(); |
| 9704 } |
| 9705 |
| 9702 MaybeLocal<debug::Script> debug::GeneratorObject::Script() { | 9706 MaybeLocal<debug::Script> debug::GeneratorObject::Script() { |
| 9703 i::Handle<i::JSGeneratorObject> obj = Utils::OpenHandle(this); | 9707 i::Handle<i::JSGeneratorObject> obj = Utils::OpenHandle(this); |
| 9704 i::Object* maybe_script = obj->function()->shared()->script(); | 9708 i::Object* maybe_script = obj->function()->shared()->script(); |
| 9705 if (!maybe_script->IsScript()) return MaybeLocal<debug::Script>(); | 9709 if (!maybe_script->IsScript()) return MaybeLocal<debug::Script>(); |
| 9706 i::Handle<i::Script> script(i::Script::cast(maybe_script), obj->GetIsolate()); | 9710 i::Handle<i::Script> script(i::Script::cast(maybe_script), obj->GetIsolate()); |
| 9707 return ToApiHandle<debug::Script>(script); | 9711 return ToApiHandle<debug::Script>(script); |
| 9708 } | 9712 } |
| 9709 | 9713 |
| 9710 Local<Function> debug::GeneratorObject::Function() { | 9714 Local<Function> debug::GeneratorObject::Function() { |
| 9711 i::Handle<i::JSGeneratorObject> obj = Utils::OpenHandle(this); | 9715 i::Handle<i::JSGeneratorObject> obj = Utils::OpenHandle(this); |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10459 Address callback_address = | 10463 Address callback_address = |
| 10460 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10464 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 10461 VMState<EXTERNAL> state(isolate); | 10465 VMState<EXTERNAL> state(isolate); |
| 10462 ExternalCallbackScope call_scope(isolate, callback_address); | 10466 ExternalCallbackScope call_scope(isolate, callback_address); |
| 10463 callback(info); | 10467 callback(info); |
| 10464 } | 10468 } |
| 10465 | 10469 |
| 10466 | 10470 |
| 10467 } // namespace internal | 10471 } // namespace internal |
| 10468 } // namespace v8 | 10472 } // namespace v8 |
| OLD | NEW |