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
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
anonrig authored and RafaelGSS committed Apr 13, 2023
1 parent 88387cc commit a4895df
Show file tree
Hide file tree
Showing 9 changed files with 473 additions and 258 deletions.
254 changes: 194 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 @@ -58,9 +58,7 @@ const {
urlToHttpOptions,
} = require('internal/url');

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

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

Expand Down Expand Up @@ -635,7 +633,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
3 changes: 2 additions & 1 deletion src/base_object_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ namespace node {
V(v8_binding_data, v8_utils::BindingData) \
V(blob_binding_data, BlobBindingData) \
V(process_binding_data, process::BindingData) \
V(timers_binding_data, timers::BindingData)
V(timers_binding_data, timers::BindingData) \
V(url_binding_data, url::BindingData)

#define UNSERIALIZABLE_BINDING_TYPES(V) \
V(http2_binding_data, http2::BindingData) \
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
Loading

0 comments on commit a4895df

Please sign in to comment.