Skip to content

Commit 3fb4935

Browse files
committed
Backed out changeset 56c29b147a21 (bug 1874785) for causing multiple build bustages. CLOSED TREE
1 parent 1073774 commit 3fb4935

File tree

3 files changed

+0
-22
lines changed

3 files changed

+0
-22
lines changed

js/src/builtin/TestingFunctions.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5263,12 +5263,6 @@ class CustomSerializableObject : public NativeObject {
52635263
self.infallibleInit();
52645264
self.set(js_new<ActivityLog>());
52655265
MOZ_RELEASE_ASSERT(self.get());
5266-
TlsContext.get()->runtime()->atExit(
5267-
[](void* vpData) {
5268-
auto* log = static_cast<ActivityLog*>(vpData);
5269-
js_delete(log);
5270-
},
5271-
self.get());
52725266
}
52735267
return self.get();
52745268
}

js/src/vm/Runtime.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,6 @@ void JSRuntime::destroyRuntime() {
210210
MOZ_ASSERT(childRuntimeCount == 0);
211211
MOZ_ASSERT(initialized_);
212212

213-
for (auto [f, data] : cleanupClosures.ref()) {
214-
f(data);
215-
}
216-
cleanupClosures.ref().clear();
217-
218213
#ifdef JS_HAS_INTL_API
219214
sharedIntlData.ref().destroyInstance();
220215
#endif

js/src/vm/Runtime.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -665,20 +665,9 @@ struct JSRuntime {
665665
/* Code coverage output. */
666666
js::UnprotectedData<js::coverage::LCovRuntime> lcovOutput_;
667667

668-
/* Functions to call, together with data, when the runtime is being torn down.
669-
*/
670-
js::MainThreadData<std::vector<std::pair<void (*)(void*), void*>>>
671-
cleanupClosures;
672-
673668
public:
674669
js::coverage::LCovRuntime& lcovOutput() { return lcovOutput_.ref(); }
675670

676-
/* Register a cleanup function to be called during runtime shutdown. Do not
677-
* depend on the ordering of cleanup calls. */
678-
void atExit(void (*function)(void*), void* data) {
679-
cleanupClosures.ref().push_back({function, data});
680-
}
681-
682671
private:
683672
js::UnprotectedData<js::jit::JitRuntime*> jitRuntime_;
684673

0 commit comments

Comments
 (0)