Skip to content

Commit 74ceb71

Browse files
committed
fix(JobQueue): don't double-free finalizationRegistryCallbacks vector
1 parent fba9c25 commit 74ceb71

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

include/JobQueue.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class JobQueue : public JS::JobQueue {
2828
//
2929
public:
3030
explicit JobQueue(JSContext *cx);
31-
~JobQueue();
31+
~JobQueue() = default;
3232

3333
/**
3434
* @brief Ask the embedding for the incumbent global.

src/JobQueue.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ JobQueue::JobQueue(JSContext *cx) {
1515
finalizationRegistryCallbacks = new JS::PersistentRooted<FunctionVector>(cx);
1616
}
1717

18-
JobQueue::~JobQueue() {
19-
delete finalizationRegistryCallbacks;
20-
}
21-
2218
JSObject *JobQueue::getIncumbentGlobal(JSContext *cx) {
2319
return JS::CurrentGlobalOrNull(cx);
2420
}

0 commit comments

Comments
 (0)