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

Side by Side Diff: include/v8.h

Issue 2351113004: [modules] Expand API to allow linking and use it in d8 (Closed)
Patch Set: Use StrictEquals, remove check for bad instantiation behavior Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 1072
1073 /** 1073 /**
1074 * This is an unfinished experimental feature, and is only exposed 1074 * This is an unfinished experimental feature, and is only exposed
1075 * here for internal testing purposes. DO NOT USE. 1075 * here for internal testing purposes. DO NOT USE.
1076 * 1076 *
1077 * A compiled JavaScript module. 1077 * A compiled JavaScript module.
1078 */ 1078 */
1079 class V8_EXPORT Module { 1079 class V8_EXPORT Module {
1080 public: 1080 public:
1081 /** 1081 /**
1082 * Returns the number of modules requested by this module.
1083 */
1084 int GetModuleRequestsLength() const;
1085
1086 /**
1087 * Returns the ith module specifier in this module.
1088 * i must be < GetModuleRequestsLength() and >= 0.
1089 */
1090 Local<String> GetModuleRequest(int i) const;
1091
1092 typedef MaybeLocal<Module> (*ResolveCallback)(Local<Context> context,
1093 Local<String> specifier,
1094 Local<Module> referrer,
1095 Local<Value> data);
1096
1097 /**
1082 * ModuleDeclarationInstantiation 1098 * ModuleDeclarationInstantiation
1083 * 1099 *
1084 * Returns false if an exception occurred during instantiation. 1100 * Returns false if an exception occurred during instantiation.
1085 */ 1101 */
1086 V8_WARN_UNUSED_RESULT bool Instantiate(Local<Context> context); 1102 V8_WARN_UNUSED_RESULT bool Instantiate(
1103 Local<Context> context, ResolveCallback callback,
1104 Local<Value> callback_data = Local<Value>());
1087 1105
1088 /** 1106 /**
1089 * ModuleEvaluation 1107 * ModuleEvaluation
1090 */ 1108 */
1091 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Evaluate(Local<Context> context); 1109 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Evaluate(Local<Context> context);
1092 }; 1110 };
1093 1111
1094 /** 1112 /**
1095 * A compiled JavaScript script, tied to a Context which was active when the 1113 * A compiled JavaScript script, tied to a Context which was active when the
1096 * script was compiled. 1114 * script was compiled.
(...skipping 8450 matching lines...) Expand 10 before | Expand all | Expand 10 after
9547 */ 9565 */
9548 9566
9549 9567
9550 } // namespace v8 9568 } // namespace v8
9551 9569
9552 9570
9553 #undef TYPE_CHECK 9571 #undef TYPE_CHECK
9554 9572
9555 9573
9556 #endif // INCLUDE_V8_H_ 9574 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698