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

Unified Diff: src/objects.cc

Issue 2473993002: [modules] Make handling of module info's regular exports more robust. (Closed)
Patch Set: cast size_t Created 4 years, 1 month 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/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index a8b25d2a8002cf2a186f81268ecf91d25e843c31..1f54decb599d962117d6b6aa84bbbb99fd5dff30 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -20011,11 +20011,9 @@ bool Module::Instantiate(Handle<Module> module, v8::Local<v8::Context> context,
isolate);
// Set up local exports.
- Handle<FixedArray> regular_exports(module_info->regular_exports(), isolate);
- for (int i = 0, n = regular_exports->length(); i < n; i += 3) {
- // TODO(neis): Make this more robust.
- Handle<FixedArray> export_names(
- FixedArray::cast(regular_exports->get(i + 2)), isolate);
+ for (int i = 0, n = module_info->RegularExportCount(); i < n; ++i) {
+ Handle<FixedArray> export_names(module_info->RegularExportExportNames(i),
+ isolate);
CreateExport(module, export_names);
}
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698