mirror of
https://github.com/atom/atom.git
synced 2026-01-15 01:48:15 -05:00
🔥 Remove unneeded WeakSet
This commit is contained in:
@@ -10,7 +10,6 @@ export default class FileRecoveryService {
|
||||
this.recoveryDirectory = recoveryDirectory
|
||||
this.recoveryFilesByFilePath = new Map()
|
||||
this.recoveryFilesByWindow = new WeakMap()
|
||||
this.observedWindows = new WeakSet()
|
||||
}
|
||||
|
||||
willSavePath (window, path) {
|
||||
@@ -31,10 +30,6 @@ export default class FileRecoveryService {
|
||||
console.log(`Couldn't retain ${recoveryFile.recoveryPath}. Code: ${err.code}. Message: ${err.message}`)
|
||||
}
|
||||
|
||||
if (!this.observedWindows.has(window)) {
|
||||
this.observedWindows.add(window)
|
||||
}
|
||||
|
||||
if (!this.recoveryFilesByWindow.has(window)) {
|
||||
this.recoveryFilesByWindow.set(window, new Set())
|
||||
}
|
||||
@@ -76,7 +71,6 @@ export default class FileRecoveryService {
|
||||
}
|
||||
|
||||
didCloseWindow (window) {
|
||||
this.observedWindows.delete(window)
|
||||
this.recoveryFilesByWindow.delete(window)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user