Skip to content

Commit 4128055

Browse files
joyeecheungaddaleax
andcommitted
fixup! bootstrap: move embedded snapshot to SnapshotBuilder
Co-authored-by: Anna Henningsen <github@addaleax.net>
1 parent 1f4cce1 commit 4128055

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/node_snapshotable.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,8 @@ const SnapshotData* SnapshotBuilder::GetEmbeddedSnapshotData() {
9292
return ss.str();
9393
}
9494

95-
std::unique_ptr<ExternalReferenceRegistry> SnapshotBuilder::registry_ = nullptr;
96-
Mutex SnapshotBuilder::snapshot_data_mutex_;
97-
9895
const std::vector<intptr_t>& SnapshotBuilder::CollectExternalReferences() {
99-
Mutex::ScopedLock lock(snapshot_data_mutex_);
100-
if (registry_ == nullptr) {
101-
registry_.reset(new ExternalReferenceRegistry());
102-
}
96+
static auto registry = std::make_unique<ExternalReferenceRegistry>();
10397
return registry_->external_references();
10498
}
10599

0 commit comments

Comments
 (0)