Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17,043 changes: 7,168 additions & 9,875 deletions deps/ada/ada.cpp

Large diffs are not rendered by default.

1,668 changes: 1,003 additions & 665 deletions deps/ada/ada.h

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion deps/ada/ada_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
// It represents "uint32_t(-1)"
#define ada_url_omitted 0xffffffff

// string that is owned by the ada_url instance
// string that points to data stored in the ada_url instance
//
// Lifetime rules:
// - This pointer remains valid only while the underlying ada_url is unchanged.
// - Any mutation (e.g., ada_set_* and ada_clear_*) may invalidate previously
// returned ada_string pointers.
typedef struct {
const char* data;
size_t length;
Expand Down Expand Up @@ -57,6 +62,9 @@ bool ada_is_valid(ada_url result);

// url_aggregator getters
// if ada_is_valid(result)) is false, an empty string is returned
//
// Important: this invalidation rule applies only to getters that return
// ada_string. The ada_get_origin getter returns ada_owned_string.
ada_owned_string ada_get_origin(ada_url result);
ada_string ada_get_href(ada_url result);
ada_string ada_get_username(ada_url result);
Expand Down Expand Up @@ -184,6 +192,10 @@ ada_string_pair ada_search_params_entries_iter_next(
bool ada_search_params_entries_iter_has_next(
ada_url_search_params_entries_iter result);

// max URL length configuration
void ada_set_max_input_length(uint32_t length);
uint32_t ada_get_max_input_length(void);

// Definitions for Ada's version number.
typedef struct {
int major;
Expand Down
6 changes: 5 additions & 1 deletion test/benchmark/test-benchmark-url.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
'use strict';

require('../common');
const { skip } = require('../common');

if (process.config.variables.node_shared_ada) {
skip('WHATWG URL parsing is affected by different versions of Ada');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not skip this... WHATWG is a living standard that is not bounded by the semver-major changes. We should either fix the tests in this file, or remove this file, since they're already tested in WPT.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we skip the WPT tests with --shared-ada as well?

if (process.config.variables.node_shared_ada) {
skip('Different versions of Ada affect the WPT tests');
}

}

const runBenchmark = require('../common/benchmark');

Expand Down
Loading