From f0a3d206422af3177e0f36ed22802c1ccc6f7654 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Fri, 6 Sep 2024 19:52:59 +0900 Subject: fix(runtime): use more null proto objects again (#25040) proceed with #23921 This PR is a preparation for https://github.com/denoland/deno_lint/pull/1307 --------- Signed-off-by: Kenta Moriuchi Co-authored-by: Luca Casonato --- ext/net/01_net.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext/net/01_net.js') diff --git a/ext/net/01_net.js b/ext/net/01_net.js index 87bbcd476..12a0a6bf2 100644 --- a/ext/net/01_net.js +++ b/ext/net/01_net.js @@ -103,11 +103,13 @@ class Conn { constructor(rid, remoteAddr, localAddr) { if (internals.future) { ObjectDefineProperty(this, "rid", { + __proto__: null, enumerable: false, value: undefined, }); } ObjectDefineProperty(this, internalRidSymbol, { + __proto__: null, enumerable: false, value: rid, }); @@ -214,6 +216,7 @@ class TcpConn extends Conn { constructor(rid, remoteAddr, localAddr) { super(rid, remoteAddr, localAddr); ObjectDefineProperty(this, internalRidSymbol, { + __proto__: null, enumerable: false, value: rid, }); @@ -244,6 +247,7 @@ class UnixConn extends Conn { constructor(rid, remoteAddr, localAddr) { super(rid, remoteAddr, localAddr); ObjectDefineProperty(this, internalRidSymbol, { + __proto__: null, enumerable: false, value: rid, }); @@ -269,11 +273,13 @@ class Listener { constructor(rid, addr) { if (internals.future) { ObjectDefineProperty(this, "rid", { + __proto__: null, enumerable: false, value: undefined, }); } ObjectDefineProperty(this, internalRidSymbol, { + __proto__: null, enumerable: false, value: rid, }); -- cgit v1.2.3