url: stricter domainTo*() argument checking#12134
Closed
TimothyGu wants to merge 1 commit intonodejs:masterfrom
Closed
url: stricter domainTo*() argument checking#12134TimothyGu wants to merge 1 commit intonodejs:masterfrom
TimothyGu wants to merge 1 commit intonodejs:masterfrom
Conversation
hiroppy
approved these changes
Mar 30, 2017
cjihrig
previously requested changes
Mar 30, 2017
lib/internal/url.js
Outdated
Contributor
There was a problem hiding this comment.
Can you change these to checks against domain explicitly. No need to introduce arguments for no reason.
Member
Author
There was a problem hiding this comment.
That would be against the semantics used by other WHATWG URL interface methods. Why the aversion to arguments in this case? arguments.length is perfectly fine and optimizable by V8.
Member
There was a problem hiding this comment.
Since url.host = undefined actually sets the domain to "undefined"...it makes sense for domainTo* too so arguments.length is needed
joyeecheung
approved these changes
Apr 1, 2017
watilde
approved these changes
Apr 3, 2017
jasnell
approved these changes
Apr 3, 2017
Rationale for arguments.length has been explained.
ee60063 to
03a3909
Compare
Member
Author
|
Rebased. New CI: https://ci.nodejs.org/job/node-test-pull-request/7185/ |
jasnell
pushed a commit
that referenced
this pull request
Apr 4, 2017
PR-URL: #12134 Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
|
Landed in c4469c4 |
|
cc @TimothyGu |
4 tasks
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.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
url