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

Unified Diff: src/api.cc

Issue 2366063002: [modules] Initialize requested_modules before recursing in Module::Instantiate (Closed)
Patch Set: Make test more robust 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 | test/mjsunit/modules-circular-valid.js » ('j') | no next file with comments »
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 b962909ee29470f91bf061d21cf1974c15ec575d..e1a6dcd9cef807d90494550de89b3ddd33ca165e 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1976,10 +1976,11 @@ static bool InstantiateModule(Local<Module> v8_module,
isolate->ThrowIllegalOperation();
return false;
}
- if (!requested_module->Instantiate(v8_context, callback, callback_data)) {
+ module->requested_modules()->set(i, *Utils::OpenHandle(*requested_module));
+ if (!InstantiateModule(requested_module, v8_context, callback,
+ callback_data)) {
return false;
}
- module->requested_modules()->set(i, *Utils::OpenHandle(*requested_module));
}
// Resolve imports.
« no previous file with comments | « no previous file | test/mjsunit/modules-circular-valid.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698