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 <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
  • Loading branch information
aduh95 authored Jul 24, 2023
1 parent 1ceb8c1 commit ad0603e
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 ad0603e

Please sign in to comment.