Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url: clean up WHATWG URL origin generation #12252

Closed
wants to merge 2 commits into from

Conversation

@TimothyGu
Copy link
Member

commented Apr 6, 2017

  • Directly generate serialized string instead of going through class construction + toString()
  • Use template string literals
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

url

url: clean up WHATWG URL origin generation
- Use ordinary properties instead of symbols/getter redirection for
  internal object
- Use template string literals
- Remove unneeded custom inspection for internal objects
- Remove unneeded OpaqueOrigin class
- Remove unneeded type checks
@mscdex

This comment has been minimized.

Copy link
Contributor

commented Apr 6, 2017

Perhaps originFor() could be also changed/optimized to always return the string representation of the origin (avoiding unnecessary intermediary object creation), since originFor() is only used in one place and immediately calls .toString() on the result?

@TimothyGu

This comment has been minimized.

Copy link
Member Author

commented Apr 6, 2017

@mscdex That was my original intent, and I tried to do that in #10955. But it was blocked by #10955 (comment) (not sure if @jasnell's opinion has changed).

@jasnell

This comment has been minimized.

Copy link
Member

commented Apr 6, 2017

I have since refractored the code that was using it. Simplifying should be fine.

@joyeecheung

This comment has been minimized.

@joyeecheung joyeecheung added this to Spec Irrelavent / De-facto in WHATWG URL implementation Apr 11, 2017

@refack refack force-pushed the nodejs:master branch to fbe946b Apr 14, 2017

@addaleax

This comment has been minimized.

Copy link
Member

commented Apr 14, 2017

Landed in aff5cc9

@addaleax addaleax closed this Apr 14, 2017

addaleax added a commit that referenced this pull request Apr 14, 2017
url: clean up WHATWG URL origin generation
- Use ordinary properties instead of symbols/getter redirection for
  internal object
- Use template string literals
- Remove unneeded custom inspection for internal objects
- Remove unneeded OpaqueOrigin class
- Remove unneeded type checks

PR-URL: #12252
Reviewed-By: James M Snell <jasnell@gmail.com>

@TimothyGu TimothyGu deleted the TimothyGu:url-origin branch Apr 14, 2017

@watilde watilde moved this from Spec Irrelavent / De-facto to Done in WHATWG URL implementation Apr 17, 2017

@TimothyGu TimothyGu referenced this pull request Apr 19, 2017
4 of 4 tasks complete
@jasnell jasnell referenced this pull request May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
6 participants
You can’t perform that action at this time.