We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f4cce1 commit 4128055Copy full SHA for 4128055
src/node_snapshotable.cc
@@ -92,14 +92,8 @@ const SnapshotData* SnapshotBuilder::GetEmbeddedSnapshotData() {
92
return ss.str();
93
}
94
95
-std::unique_ptr<ExternalReferenceRegistry> SnapshotBuilder::registry_ = nullptr;
96
-Mutex SnapshotBuilder::snapshot_data_mutex_;
97
-
98
const std::vector<intptr_t>& SnapshotBuilder::CollectExternalReferences() {
99
- Mutex::ScopedLock lock(snapshot_data_mutex_);
100
- if (registry_ == nullptr) {
101
- registry_.reset(new ExternalReferenceRegistry());
102
- }
+ static auto registry = std::make_unique<ExternalReferenceRegistry>();
103
return registry_->external_references();
104
105
0 commit comments