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

Unified Diff: include/v8.h

Issue 2351113004: [modules] Expand API to allow linking and use it in d8 (Closed)
Patch Set: Change return value of FetchModuleTree 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') | src/api.cc » ('J')
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..3bcc1e4b8a9c70054b7f26bcd0f5397630afe861 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 imported by this module.
+ */
neis 2016/09/20 21:07:30 s/imported/requested/, or say "imported or re-expo
adamk 2016/09/20 21:13:58 Done.
+ 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);
/**
* ModuleEvaluation
« no previous file with comments | « no previous file | src/api.h » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698