diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-25 00:45:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-25 00:45:19 +0100 |
| commit | 174bb70eda6bd3eea48c9fcd240041a62749eab6 (patch) | |
| tree | e93ae5ebe93ce0923f97adf4491764e8f46de498 /ext/net/01_net.js | |
| parent | a4e64fb7da40f76fe4448a4cc58e30deeee3d5d5 (diff) | |
fix: don't use public rid accessors in internal APIs (#22091)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'ext/net/01_net.js')
| -rw-r--r-- | ext/net/01_net.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js index a2b04de76..f761aed14 100644 --- a/ext/net/01_net.js +++ b/ext/net/01_net.js @@ -40,6 +40,7 @@ const { SetPrototypeForEach, SymbolAsyncIterator, Symbol, + SymbolFor, TypeError, TypedArrayPrototypeSubarray, Uint8Array, @@ -90,6 +91,7 @@ async function resolveDns(query, recordType, options) { } class Conn { + [SymbolFor("Deno.internal.rid")] = 0; #rid = 0; #remoteAddr = null; #localAddr = null; @@ -100,6 +102,7 @@ class Conn { #writable; constructor(rid, remoteAddr, localAddr) { + this[SymbolFor("Deno.internal.rid")] = rid; this.#rid = rid; this.#remoteAddr = remoteAddr; this.#localAddr = localAddr; @@ -198,10 +201,12 @@ class Conn { } class TcpConn extends Conn { + [SymbolFor("Deno.internal.rid")] = 0; #rid = 0; constructor(rid, remoteAddr, localAddr) { super(rid, remoteAddr, localAddr); + this[SymbolFor("Deno.internal.rid")] = rid; this.#rid = rid; } @@ -224,10 +229,12 @@ class TcpConn extends Conn { } class UnixConn extends Conn { + [SymbolFor("Deno.internal.rid")] = 0; #rid = 0; constructor(rid, remoteAddr, localAddr) { super(rid, remoteAddr, localAddr); + this[SymbolFor("Deno.internal.rid")] = rid; this.#rid = rid; } @@ -242,12 +249,14 @@ class UnixConn extends Conn { } class Listener { + [SymbolFor("Deno.internal.rid")] = 0; #rid = 0; #addr = null; #unref = false; #promise = null; constructor(rid, addr) { + this[SymbolFor("Deno.internal.rid")] = rid; this.#rid = rid; this.#addr = addr; } |
