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 4457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4468 } | 4468 } |
4469 | 4469 |
4470 MaybeLocal<Array> v8::Object::GetOwnPropertyNames(Local<Context> context, | 4470 MaybeLocal<Array> v8::Object::GetOwnPropertyNames(Local<Context> context, |
4471 PropertyFilter filter) { | 4471 PropertyFilter filter) { |
4472 return GetPropertyNames(context, KeyCollectionMode::kOwnOnly, filter, | 4472 return GetPropertyNames(context, KeyCollectionMode::kOwnOnly, filter, |
4473 v8::IndexFilter::kIncludeIndices); | 4473 v8::IndexFilter::kIncludeIndices); |
4474 } | 4474 } |
4475 | 4475 |
4476 MaybeLocal<String> v8::Object::ObjectProtoToString(Local<Context> context) { | 4476 MaybeLocal<String> v8::Object::ObjectProtoToString(Local<Context> context) { |
4477 PREPARE_FOR_EXECUTION(context, Object, ObjectProtoToString, String); | 4477 PREPARE_FOR_EXECUTION(context, Object, ObjectProtoToString, String); |
4478 auto obj = Utils::OpenHandle(this); | 4478 auto self = Utils::OpenHandle(this); |
4479 Local<String> result; | 4479 Local<Value> result; |
4480 has_pending_exception = | 4480 has_pending_exception = |
4481 !ToLocal<String>(i::JSObject::ObjectProtoToString(isolate, obj), &result); | 4481 !ToLocal<Value>(i::Execution::Call(isolate, isolate->object_to_string(), |
| 4482 self, 0, nullptr), |
| 4483 &result); |
4482 RETURN_ON_FAILED_EXECUTION(String); | 4484 RETURN_ON_FAILED_EXECUTION(String); |
4483 RETURN_ESCAPED(result); | 4485 RETURN_ESCAPED(Local<String>::Cast(result)); |
4484 } | 4486 } |
4485 | 4487 |
4486 | 4488 |
4487 Local<String> v8::Object::ObjectProtoToString() { | 4489 Local<String> v8::Object::ObjectProtoToString() { |
4488 auto context = ContextFromHeapObject(Utils::OpenHandle(this)); | 4490 auto context = ContextFromHeapObject(Utils::OpenHandle(this)); |
4489 RETURN_TO_LOCAL_UNCHECKED(ObjectProtoToString(context), String); | 4491 RETURN_TO_LOCAL_UNCHECKED(ObjectProtoToString(context), String); |
4490 } | 4492 } |
4491 | 4493 |
4492 | 4494 |
4493 Local<String> v8::Object::GetConstructorName() { | 4495 Local<String> v8::Object::GetConstructorName() { |
(...skipping 5428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9922 Address callback_address = | 9924 Address callback_address = |
9923 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9925 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9924 VMState<EXTERNAL> state(isolate); | 9926 VMState<EXTERNAL> state(isolate); |
9925 ExternalCallbackScope call_scope(isolate, callback_address); | 9927 ExternalCallbackScope call_scope(isolate, callback_address); |
9926 callback(info); | 9928 callback(info); |
9927 } | 9929 } |
9928 | 9930 |
9929 | 9931 |
9930 } // namespace internal | 9932 } // namespace internal |
9931 } // namespace v8 | 9933 } // namespace v8 |
OLD | NEW |