mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
misc fixes (#2892)
* use docker for build steps that require linux when not on linux * use fuse for overlay * quiet mountpoint * node 22 * misc fixes * make shasum more compliant * optimize download-base-image.sh with cleaner url handling and checksum verification * fix script * fixes #2900 * bump node and npm versions in web readme * Minor pl.ts fixes * fixes in response to synapse issues * beta.8 * update ts-matches * beta.11 * pl.ts finetuning --------- Co-authored-by: Mariusz Kogen <k0gen@pm.me> Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -10,9 +10,20 @@ export abstract class Drop {
|
||||
protected constructor() {
|
||||
this.id = Drop.idCtr++
|
||||
this.ref = { id: this.id }
|
||||
Drop.weak[this.id] = this.weak()
|
||||
Drop.registry.register(this, this.id, this)
|
||||
const weak = this.weak()
|
||||
Drop.weak[this.id] = weak
|
||||
Drop.registry.register(this.ref, this.id, this.ref)
|
||||
|
||||
return new Proxy(this, {
|
||||
set(target: any, prop, value) {
|
||||
if (prop === "ref") return false
|
||||
target[prop] = value
|
||||
;(weak as any)[prop] = value
|
||||
return true
|
||||
},
|
||||
})
|
||||
}
|
||||
protected register() {}
|
||||
protected weak(): this {
|
||||
const weak = Object.assign(Object.create(Object.getPrototypeOf(this)), this)
|
||||
weak.ref = new WeakRef(this.ref)
|
||||
@@ -21,7 +32,7 @@ export abstract class Drop {
|
||||
abstract onDrop(): void
|
||||
drop(): void {
|
||||
this.onDrop()
|
||||
Drop.registry.unregister(this)
|
||||
Drop.registry.unregister(this.ref)
|
||||
delete Drop.weak[this.id]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user