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

Unified Diff: src/factory.cc

Issue 2407183002: [modules] Don't unnecessarily keep function alive after evaluation. (Closed)
Patch Set: Remove shared(). Created 4 years, 2 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/objects.h » ('j') | src/objects.h » ('J')
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 9e1fff4d85b3c4d89a7fda0a4a62c9df4d2b58c6..c83d339c5d2bbb1c6f7ba4c23f01b1d01afb9aac 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1793,10 +1793,11 @@ Handle<Module> Factory::NewModule(Handle<SharedFunctionInfo> code) {
Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE));
module->set_code(*code);
module->set_exports(*exports);
- module->set_flags(0);
module->set_hash(isolate()->GenerateIdentityHash(Smi::kMaxValue));
module->set_module_namespace(isolate()->heap()->undefined_value());
module->set_requested_modules(*requested_modules);
+ DCHECK(!module->instantiated());
+ DCHECK(!module->evaluated());
return module;
}
« no previous file with comments | « src/api.cc ('k') | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698