Skip to content

Commit

Permalink
url: use ada::url_aggregator for parsing urls
Browse files Browse the repository at this point in the history
PR-URL: #47339
Backport-PR-URL: #48345
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
anonrig authored and danielleadams committed Jul 12, 2023
1 parent 96c50ba commit b395b16
Show file tree
Hide file tree
Showing 9 changed files with 478 additions and 257 deletions.
258 changes: 198 additions & 60 deletions lib/internal/url.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ const {
urlToHttpOptions,
} = require('internal/url');

const {
formatUrl,
} = internalBinding('url');
const bindingUrl = internalBinding('url');

const { getOptionValue } = require('internal/options');

Expand Down Expand Up @@ -627,7 +625,7 @@ function urlFormat(urlObject, options) {
}
}

return formatUrl(urlObject.href, fragment, unicode, search, auth);
return bindingUrl.format(urlObject.href, fragment, unicode, search, auth);
}

return Url.prototype.format.call(urlObject);
Expand Down
1 change: 1 addition & 0 deletions src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "node_metadata.h"
#include "node_process.h"
#include "node_snapshot_builder.h"
#include "node_url.h"
#include "node_util.h"
#include "node_v8.h"
#include "node_v8_platform-inl.h"
Expand Down
1 change: 1 addition & 0 deletions src/node_snapshotable.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct PropInfo {
V(v8_binding_data, v8_utils::BindingData) \
V(blob_binding_data, BlobBindingData) \
V(process_binding_data, process::BindingData) \
V(url_binding_data, url::BindingData) \
V(util_weak_reference, util::WeakReference)

enum class EmbedderObjectType : uint8_t {
Expand Down
Loading

0 comments on commit b395b16

Please sign in to comment.