From b12c3b5240768e29a5dbe7af7b10306a5cd5d2ad Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 24 Jul 2023 09:47:47 +0200 Subject: [PATCH] url: ensure getter access do not mutate observable symbols PR-URL: https://github.com/nodejs/node/pull/48897 Refs: https://github.com/nodejs/node/pull/48891 Refs: https://github.com/nodejs/node/issues/48886 Reviewed-By: Yagiz Nizipli Reviewed-By: Moshe Atlow --- test/parallel/test-whatwg-url-custom-searchparams.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel/test-whatwg-url-custom-searchparams.js b/test/parallel/test-whatwg-url-custom-searchparams.js index 0b2087ac246313..75fa1779bdeb45 100644 --- a/test/parallel/test-whatwg-url-custom-searchparams.js +++ b/test/parallel/test-whatwg-url-custom-searchparams.js @@ -16,7 +16,9 @@ const normalizedValues = ['a', '1', 'true', 'undefined', 'null', '\uFFFD', '[object Object]']; const m = new URL('http://example.org'); +const ownSymbolsBeforeGetterAccess = Object.getOwnPropertySymbols(m); const sp = m.searchParams; +assert.deepStrictEqual(Object.getOwnPropertySymbols(m), ownSymbolsBeforeGetterAccess); assert(sp); assert.strictEqual(sp.toString(), '');