Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: src/api-natives.h

Issue 895053002: Move the contents of api-natives.js to c++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/api-natives.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api-natives.h
diff --git a/src/api-natives.h b/src/api-natives.h
new file mode 100644
index 0000000000000000000000000000000000000000..8f93d6415daa784ca29faa40104c5597859b43a2
--- /dev/null
+++ b/src/api-natives.h
@@ -0,0 +1,38 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_API_NATIVES_H_
+#define V8_API_NATIVES_H_
+
+#include "src/handles.h"
+
+namespace v8 {
+namespace internal {
+
+class ApiNatives {
+ public:
+ MUST_USE_RESULT static MaybeHandle<JSFunction> InstantiateFunction(
+ Handle<FunctionTemplateInfo> data);
+ MUST_USE_RESULT static MaybeHandle<JSObject> InstantiateObject(
+ Handle<ObjectTemplateInfo> data);
+ MUST_USE_RESULT static MaybeHandle<FunctionTemplateInfo> ConfigureInstance(
+ Isolate* isolate, Handle<FunctionTemplateInfo> instance,
+ Handle<JSObject> data);
+
+ enum ApiInstanceType {
+ JavaScriptObjectType,
+ GlobalObjectType,
+ GlobalProxyType
+ };
+
+ static Handle<JSFunction> CreateApiFunction(Isolate* isolate,
+ Handle<FunctionTemplateInfo> obj,
+ Handle<Object> prototype,
+ ApiInstanceType instance_type);
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif
« no previous file with comments | « src/api.cc ('k') | src/api-natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698