Skip to content

Commit

Permalink
url: ensure getter access do not mutate observable symbols
Browse files Browse the repository at this point in the history
PR-URL: #48897
Refs: #48891
Refs: #48886
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
  • Loading branch information
aduh95 authored and RafaelGSS committed Aug 15, 2023
1 parent 015c4f7 commit b12c3b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/parallel/test-whatwg-url-custom-searchparams.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(), '');
Expand Down

0 comments on commit b12c3b5

Please sign in to comment.