| 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 6077 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6088   RETURN_ESCAPED(result); | 6088   RETURN_ESCAPED(result); | 
| 6089 } | 6089 } | 
| 6090 | 6090 | 
| 6091 | 6091 | 
| 6092 Local<Object> Array::CloneElementAt(uint32_t index) { | 6092 Local<Object> Array::CloneElementAt(uint32_t index) { | 
| 6093   auto context = ContextFromHeapObject(Utils::OpenHandle(this)); | 6093   auto context = ContextFromHeapObject(Utils::OpenHandle(this)); | 
| 6094   RETURN_TO_LOCAL_UNCHECKED(CloneElementAt(context, index), Object); | 6094   RETURN_TO_LOCAL_UNCHECKED(CloneElementAt(context, index), Object); | 
| 6095 } | 6095 } | 
| 6096 | 6096 | 
| 6097 | 6097 | 
| 6098 Local<Function> Array::GetKeysIterator(Isolate* isolate) { |  | 
| 6099   i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |  | 
| 6100   i::Handle<i::JSFunction> keys( |  | 
| 6101       i_isolate->native_context()->array_keys_iterator(), i_isolate); |  | 
| 6102   DCHECK(!keys.is_null()); |  | 
| 6103   return Utils::ToLocal(keys); |  | 
| 6104 } |  | 
| 6105 |  | 
| 6106 |  | 
| 6107 Local<Function> Array::GetValuesIterator(Isolate* isolate) { |  | 
| 6108   i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |  | 
| 6109   i::Handle<i::JSFunction> values( |  | 
| 6110       i_isolate->native_context()->array_values_iterator(), i_isolate); |  | 
| 6111   DCHECK(!values.is_null()); |  | 
| 6112   return Utils::ToLocal(values); |  | 
| 6113 } |  | 
| 6114 |  | 
| 6115 |  | 
| 6116 Local<Function> Array::GetEntriesIterator(Isolate* isolate) { |  | 
| 6117   i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |  | 
| 6118   i::Handle<i::JSFunction> entries( |  | 
| 6119       i_isolate->native_context()->array_entries_iterator(), i_isolate); |  | 
| 6120   DCHECK(!entries.is_null()); |  | 
| 6121   return Utils::ToLocal(entries); |  | 
| 6122 } |  | 
| 6123 |  | 
| 6124 |  | 
| 6125 Local<v8::Map> v8::Map::New(Isolate* isolate) { | 6098 Local<v8::Map> v8::Map::New(Isolate* isolate) { | 
| 6126   i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6099   i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 
| 6127   LOG_API(i_isolate, "Map::New"); | 6100   LOG_API(i_isolate, "Map::New"); | 
| 6128   ENTER_V8(i_isolate); | 6101   ENTER_V8(i_isolate); | 
| 6129   i::Handle<i::JSMap> obj = i_isolate->factory()->NewJSMap(); | 6102   i::Handle<i::JSMap> obj = i_isolate->factory()->NewJSMap(); | 
| 6130   return Utils::ToLocal(obj); | 6103   return Utils::ToLocal(obj); | 
| 6131 } | 6104 } | 
| 6132 | 6105 | 
| 6133 | 6106 | 
| 6134 size_t v8::Map::Size() const { | 6107 size_t v8::Map::Size() const { | 
| (...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 8389   Address callback_address = | 8362   Address callback_address = | 
| 8390       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8363       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 
| 8391   VMState<EXTERNAL> state(isolate); | 8364   VMState<EXTERNAL> state(isolate); | 
| 8392   ExternalCallbackScope call_scope(isolate, callback_address); | 8365   ExternalCallbackScope call_scope(isolate, callback_address); | 
| 8393   callback(info); | 8366   callback(info); | 
| 8394 } | 8367 } | 
| 8395 | 8368 | 
| 8396 | 8369 | 
| 8397 }  // namespace internal | 8370 }  // namespace internal | 
| 8398 }  // namespace v8 | 8371 }  // namespace v8 | 
| OLD | NEW | 
|---|