Skip to content

Commit

Permalink
fixup! bootstrap: use the embedded snapshot in workers
Browse files Browse the repository at this point in the history
Co-authored-by: Anna Henningsen <[email protected]>
  • Loading branch information
joyeecheung and addaleax authored Apr 14, 2022
1 parent 1f4cce1 commit 4c6264f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,8 @@ const SnapshotData* SnapshotBuilder::GetEmbeddedSnapshotData() {
return ss.str();
}

std::unique_ptr<ExternalReferenceRegistry> SnapshotBuilder::registry_ = nullptr;
Mutex SnapshotBuilder::snapshot_data_mutex_;

const std::vector<intptr_t>& SnapshotBuilder::CollectExternalReferences() {
Mutex::ScopedLock lock(snapshot_data_mutex_);
if (registry_ == nullptr) {
registry_.reset(new ExternalReferenceRegistry());
}
static auto registry = std::make_unique<ExternalReferenceRegistry>();
return registry_->external_references();
}

Expand Down

0 comments on commit 4c6264f

Please sign in to comment.