| 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 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3508 return self->StrictEquals(*other); | 3508 return self->StrictEquals(*other); |
| 3509 } | 3509 } |
| 3510 | 3510 |
| 3511 | 3511 |
| 3512 bool Value::SameValue(Local<Value> that) const { | 3512 bool Value::SameValue(Local<Value> that) const { |
| 3513 auto self = Utils::OpenHandle(this); | 3513 auto self = Utils::OpenHandle(this); |
| 3514 auto other = Utils::OpenHandle(*that); | 3514 auto other = Utils::OpenHandle(*that); |
| 3515 return self->SameValue(*other); | 3515 return self->SameValue(*other); |
| 3516 } | 3516 } |
| 3517 | 3517 |
| 3518 MaybeLocal<String> Value::TypeOf(v8::Local<v8::Context> context, |
| 3519 Local<Value> value) { |
| 3520 PREPARE_FOR_EXECUTION(context, "TypeOf", String); |
| 3521 i::Handle<i::String> result = |
| 3522 i::Object::TypeOf(isolate, Utils::OpenHandle(*value)); |
| 3523 has_pending_exception = result.is_null(); |
| 3524 RETURN_ON_FAILED_EXECUTION(String); |
| 3525 RETURN_ESCAPED(Utils::ToLocal(result)); |
| 3526 } |
| 3518 | 3527 |
| 3519 Maybe<bool> v8::Object::Set(v8::Local<v8::Context> context, | 3528 Maybe<bool> v8::Object::Set(v8::Local<v8::Context> context, |
| 3520 v8::Local<Value> key, v8::Local<Value> value) { | 3529 v8::Local<Value> key, v8::Local<Value> value) { |
| 3521 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::Set()", bool); | 3530 PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::Set()", bool); |
| 3522 auto self = Utils::OpenHandle(this); | 3531 auto self = Utils::OpenHandle(this); |
| 3523 auto key_obj = Utils::OpenHandle(*key); | 3532 auto key_obj = Utils::OpenHandle(*key); |
| 3524 auto value_obj = Utils::OpenHandle(*value); | 3533 auto value_obj = Utils::OpenHandle(*value); |
| 3525 has_pending_exception = | 3534 has_pending_exception = |
| 3526 i::Runtime::SetObjectProperty(isolate, self, key_obj, value_obj, | 3535 i::Runtime::SetObjectProperty(isolate, self, key_obj, value_obj, |
| 3527 i::SLOPPY).is_null(); | 3536 i::SLOPPY).is_null(); |
| (...skipping 5228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8756 Address callback_address = | 8765 Address callback_address = |
| 8757 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8766 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 8758 VMState<EXTERNAL> state(isolate); | 8767 VMState<EXTERNAL> state(isolate); |
| 8759 ExternalCallbackScope call_scope(isolate, callback_address); | 8768 ExternalCallbackScope call_scope(isolate, callback_address); |
| 8760 callback(info); | 8769 callback(info); |
| 8761 } | 8770 } |
| 8762 | 8771 |
| 8763 | 8772 |
| 8764 } // namespace internal | 8773 } // namespace internal |
| 8765 } // namespace v8 | 8774 } // namespace v8 |
| OLD | NEW |