Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 8ae8fbb8117a9abba36fa2ab02f41f499a1814af..595636e05dc1d5957d67287db97b9b3be95861fe 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -2048,18 +2048,16 @@ MaybeLocal<Module> ScriptCompiler::CompileModule(Isolate* isolate, |
| if (!maybe.ToLocal(&unbound)) return MaybeLocal<Module>(); |
| i::Handle<i::SharedFunctionInfo> shared = Utils::OpenHandle(*unbound); |
| - i::Handle<i::FixedArray> regular_exports = |
| - i::handle(shared->scope_info()->ModuleDescriptorInfo()->regular_exports(), |
| - i_isolate); |
| - int regular_exports_length = regular_exports->length(); |
| - |
| - i::Handle<i::Module> module = |
| - i_isolate->factory()->NewModule(shared, regular_exports_length); |
| + i::Handle<i::Module> module = i_isolate->factory()->NewModule(shared); |
| // TODO(neis): This will create multiple cells for the same local variable if |
| // exported under multiple names, which is wrong but cannot be observed at the |
| // moment. This will be fixed by doing the full-fledged linking here once we |
| // get there. |
| + i::Handle<i::FixedArray> regular_exports = |
| + i::handle(shared->scope_info()->ModuleDescriptorInfo()->regular_exports(), |
| + i_isolate); |
| + int regular_exports_length = regular_exports->length(); |
|
neis
2016/09/20 18:07:20
Since the length now isn't used elsewhere, I would
adamk
2016/09/20 18:16:16
Done.
|
| for (int i = 0; i < regular_exports_length; ++i) { |
| i::Handle<i::ModuleInfoEntry> entry = |
| i::handle(i::ModuleInfoEntry::cast(regular_exports->get(i)), i_isolate); |