Skip to content

Commit

Permalink
fixup! bootstrap: move embedded snapshot to SnapshotBuilder
Browse files Browse the repository at this point in the history
Co-authored-by: Anna Henningsen <[email protected]>
  • Loading branch information
joyeecheung and addaleax committed Apr 14, 2022
1 parent 1f4cce1 commit 4128055
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 4128055

Please sign in to comment.