Skip to content

Commit ad0603e

Browse files
authored
url: ensure getter access do not mutate observable symbols
PR-URL: #48897 Refs: #48891 Refs: #48886 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
1 parent 1ceb8c1 commit ad0603e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-whatwg-url-custom-searchparams.js

+2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ const normalizedValues = ['a', '1', 'true', 'undefined', 'null', '\uFFFD',
1616
'[object Object]'];
1717

1818
const m = new URL('http://example.org');
19+
const ownSymbolsBeforeGetterAccess = Object.getOwnPropertySymbols(m);
1920
const sp = m.searchParams;
21+
assert.deepStrictEqual(Object.getOwnPropertySymbols(m), ownSymbolsBeforeGetterAccess);
2022

2123
assert(sp);
2224
assert.strictEqual(sp.toString(), '');

0 commit comments

Comments
 (0)