diff --git a/src/ast/modules.cc b/src/ast/modules.cc index 6d1bff226d..074dcea1ff 100644 --- a/src/ast/modules.cc +++ b/src/ast/modules.cc @@ -6,6 +6,7 @@ #include "src/ast/ast-value-factory.h" #include "src/ast/scopes.h" +#include "src/common/globals.h" #include "src/heap/local-factory-inl.h" #include "src/objects/module-inl.h" #include "src/objects/objects-inl.h" @@ -130,8 +131,10 @@ Handle SourceTextModuleDescriptor::AstModuleRequest::Serialize( // The import assertions will be stored in this array in the form: // [key1, value1, location1, key2, value2, location2, ...] Handle import_assertions_array = - isolate->factory()->NewFixedArray(static_cast( - import_assertions()->size() * ModuleRequest::kAssertionEntrySize)); + isolate->factory()->NewFixedArray( + static_cast(import_assertions()->size() * + ModuleRequest::kAssertionEntrySize), + AllocationType::kOld); int i = 0; for (auto iter = import_assertions()->cbegin(); @@ -189,7 +192,8 @@ Handle SourceTextModuleDescriptor::SerializeRegularExports( ++count; } while (next != regular_exports_.end() && next->first == it->first); - Handle export_names = isolate->factory()->NewFixedArray(count); + Handle export_names = + isolate->factory()->NewFixedArray(count, AllocationType::kOld); data[index + SourceTextModuleInfo::kRegularExportLocalNameOffset] = it->second->local_name->string(); data[index + SourceTextModuleInfo::kRegularExportCellIndexOffset] = @@ -213,7 +217,8 @@ Handle SourceTextModuleDescriptor::SerializeRegularExports( // We cannot create the FixedArray earlier because we only now know the // precise size. - Handle result = isolate->factory()->NewFixedArray(index); + Handle result = + isolate->factory()->NewFixedArray(index, AllocationType::kOld); for (int i = 0; i < index; ++i) { result->set(i, *data[i]); } diff --git a/src/codegen/compiler.cc b/src/codegen/compiler.cc index 272728cb42..99f6d725f9 100644 --- a/src/codegen/compiler.cc +++ b/src/codegen/compiler.cc @@ -1609,7 +1609,7 @@ void BackgroundCompileTask::Run() { // Save the language mode. language_mode_ = info_->language_mode(); - if (!FLAG_finalize_streaming_on_background || info_->flags().is_module()) { + if (!FLAG_finalize_streaming_on_background) { if (info_->literal() != nullptr) { CompileOnBackgroundThread(info_.get(), compile_state_.allocator(), &compilation_jobs_); @@ -3034,7 +3034,7 @@ Compiler::GetSharedFunctionInfoForStreamedScript( DCHECK_EQ(task->flags().is_module(), origin_options.IsModule()); Handle