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

Unified Diff: src/factory.cc

Issue 2347933002: [modules] Introduce v8::Module to the API and return it from CompileModule (Closed)
Patch Set: Less maybe 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 | « src/factory.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 2522803786e917e9a8cb3f1b066cd5509869d756..1c31840a55c1077b583c67a4db3d62d3a438c7cd 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1705,9 +1705,11 @@ Handle<JSGeneratorObject> Factory::NewJSGeneratorObject(
JSGeneratorObject);
}
-Handle<Module> Factory::NewModule(int min_size) {
- Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE));
+Handle<Module> Factory::NewModule(Handle<SharedFunctionInfo> code,
+ int min_size) {
Handle<ObjectHashTable> exports = ObjectHashTable::New(isolate(), min_size);
+ Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE));
+ module->set_code(*code);
module->set_exports(*exports);
return module;
}
« no previous file with comments | « src/factory.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698