mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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 <yagiz@nizipli.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
1 parent
1ceb8c113d
commit
ad0603edc6
1 file changed
+2
@@ -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(), '');
|
||||
|
||||
Reference in new issue
Block a user