Unverified Commit f306d3eb authored by Anna Henningsen's avatar Anna Henningsen Committed by Myles Borins
Browse files

src: make url host a proper C++ class

- Gives `URLHost` a proper destructor that clears memory
  depending on the type of the host (This fixes a memory leak)
- Hide the host type enums and class layout as implementation details
- Make the `Parse` methods members of `URLHost`
- Turn `WriteHost` into a `ToString()` method on the `URLHost` class
- Verify that at the beginning of a parse attempt, the type is set
  to “failed”
- Remove a lot of `goto`s from the source code 🐢🚀

Backport-PR-URL: https://github.com/nodejs/node/pull/18324
PR-URL: https://github.com/nodejs/node/pull/17470
Fixes: https://github.com/nodejs/node/issues/17448


Reviewed-By: default avatarTimothy Gu <timothygu99@gmail.com>
parent 1976c7c7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment