OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_API_NATIVES_H_ |
| 6 #define V8_API_NATIVES_H_ |
| 7 |
| 8 #include "src/handles.h" |
| 9 |
| 10 namespace v8 { |
| 11 namespace internal { |
| 12 |
| 13 class ApiNatives { |
| 14 public: |
| 15 MUST_USE_RESULT static MaybeHandle<JSFunction> InstantiateFunction( |
| 16 Handle<FunctionTemplateInfo> data); |
| 17 MUST_USE_RESULT static MaybeHandle<JSObject> InstantiateObject( |
| 18 Handle<ObjectTemplateInfo> data); |
| 19 MUST_USE_RESULT static MaybeHandle<FunctionTemplateInfo> ConfigureInstance( |
| 20 Isolate* isolate, Handle<FunctionTemplateInfo> instance, |
| 21 Handle<JSObject> data); |
| 22 |
| 23 enum ApiInstanceType { |
| 24 JavaScriptObjectType, |
| 25 GlobalObjectType, |
| 26 GlobalProxyType |
| 27 }; |
| 28 |
| 29 static Handle<JSFunction> CreateApiFunction(Isolate* isolate, |
| 30 Handle<FunctionTemplateInfo> obj, |
| 31 Handle<Object> prototype, |
| 32 ApiInstanceType instance_type); |
| 33 }; |
| 34 |
| 35 } // namespace internal |
| 36 } // namespace v8 |
| 37 |
| 38 #endif |
OLD | NEW |