url: align URLPatternInit dictionary conversion with WebIDL - #65498
Open
piyushrajyadav wants to merge 1 commit into
Open
url: align URLPatternInit dictionary conversion with WebIDL#65498piyushrajyadav wants to merge 1 commit into
piyushrajyadav wants to merge 1 commit into
Conversation
Read URLPatternInit dictionary members in lexicographical order so getters and proxy traps observe the access sequence required by WebIDL. Use sparse dictionary template values so URLPatternResult inputs only expose members present after WebIDL conversion. Fixes: nodejs#64780 Signed-off-by: piyushrajyadav <piyushyadavrajyadav@gmail.com>
Collaborator
|
Review requested:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #64780
Description
This pull request aligns
URLPatternInitdictionary conversion with the WHATWG / WebIDL specifications:URLPatternInitdictionary members in lexicographical order (baseURL,hash,hostname,password,pathname,port,protocol,search,username), ensuring getters and proxy traps observe the access sequence required by WebIDL.DictionaryTemplatevalues (tmpl->NewInstance(context, values)) so that absent dictionary members inURLPatternResult.inputsare omitted rather than exposed as own enumerable properties withundefinedvalues.Verification
test/parallel/test-urlpattern.jsverifying lexicographical access order onProxygetters and omission of absent members inexec().inputs.python tools/cpplint.py src/node_url_pattern.cc.