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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index efe3528e56ae76f7848857478872ecfbfb447309..95dc7b92bef1cf75894e0ad169f3254af616a9a8 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1079,11 +1079,29 @@ class V8_EXPORT UnboundScript {
class V8_EXPORT Module {
public:
/**
+ * Returns the number of modules requested by this module.
+ */
+ int GetModuleRequestsLength() const;
+
+ /**
+ * Returns the ith module specifier in this module.
+ * i must be < GetModuleRequestsLength() and >= 0.
+ */
+ Local<String> GetModuleRequest(int i) const;
+
+ typedef MaybeLocal<Module> (*ResolveCallback)(Local<Context> context,
+ Local<String> specifier,
+ Local<Module> referrer,
+ Local<Value> data);
+
+ /**
* ModuleDeclarationInstantiation
*
* Returns false if an exception occurred during instantiation.
*/
- V8_WARN_UNUSED_RESULT bool Instantiate(Local<Context> context);
+ V8_WARN_UNUSED_RESULT bool Instantiate(
+ Local<Context> context, ResolveCallback callback,
+ Local<Value> callback_data = Local<Value>());
/**
* ModuleEvaluation
« 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