Skip to content

Commit 6bdb059

Browse files
aduh95Ceres6
authored andcommitted
url: ensure getter access do not mutate observable symbols
PR-URL: nodejs#48897 Refs: nodejs#48891 Refs: nodejs#48886 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent cb9f39a commit 6bdb059

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)