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

Unified Diff: src/api.cc

Issue 2407183002: [modules] Don't unnecessarily keep function alive after evaluation. (Closed)
Patch Set: 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 | « no previous file | src/factory.cc » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index adb62f54fca0b1c5195e54ef2e7868226e2d5061..0726d2ff7d657f077b9d16762087e93fe2e29cc3 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1930,7 +1930,7 @@ MaybeLocal<Value> Module::Evaluate(Local<Context> context) {
i::Handle<i::Module> self = Utils::OpenHandle(this);
// It's an API error to call Evaluate before Instantiate.
- CHECK(self->code()->IsJSFunction());
+ CHECK(self->instantiated());
Local<Value> result;
has_pending_exception = !ToLocal(i::Module::Evaluate(self), &result);
« no previous file with comments | « no previous file | src/factory.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698