From 174bb70eda6bd3eea48c9fcd240041a62749eab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 25 Jan 2024 00:45:19 +0100 Subject: fix: don't use public rid accessors in internal APIs (#22091) Co-authored-by: Asher Gomez --- runtime/js/40_http.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/40_http.js b/runtime/js/40_http.js index fcabf237b..313adcbee 100644 --- a/runtime/js/40_http.js +++ b/runtime/js/40_http.js @@ -1,8 +1,11 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { core, internals } from "ext:core/mod.js"; +import { core, internals, primordials } from "ext:core/mod.js"; const { op_http_start, } = core.ensureFastOps(); +const { + SymbolFor, +} = primordials; import { HttpConn } from "ext:deno_http/01_http.js"; @@ -12,7 +15,7 @@ function serveHttp(conn) { new Error().stack, "Use `Deno.serve()` instead.", ); - const rid = op_http_start(conn.rid); + const rid = op_http_start(conn[SymbolFor("Deno.internal.rid")]); return new HttpConn(rid, conn.remoteAddr, conn.localAddr); } -- cgit v1.2.3