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

lib,url: correct URL's argument to pass idlharness #39848

Closed
wants to merge 1 commit into from

Conversation

XadillaX
Copy link
Member

@XadillaX XadillaX commented Aug 23, 2021

url.idl defines URL's constructor as:

constructor(USVString url, optional USVString base);

idlharness.any.js checks its length as 1. So we should remove
constructor's second argument and use arguments[1] in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Aug 23, 2021
@targos
Copy link
Member

targos commented Aug 23, 2021

I'd prefer to use a default value: constructor(input, base = undefined) {

test/wpt/test-url.js Outdated Show resolved Hide resolved
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot
Copy link
Contributor

XadillaX added a commit that referenced this pull request Aug 26, 2021
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

PR-URL: #39848
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@XadillaX
Copy link
Member Author

Landed in 48655e1

@XadillaX XadillaX closed this Aug 26, 2021
@targos targos added the backport-requested-v16.x PRs awaiting manual backport to the v16.x-staging branch. label Sep 6, 2021
@targos
Copy link
Member

targos commented Sep 6, 2021

This depends on the semver-major #39176. Would you like to backport?

@targos targos added backport-requested-v16.x PRs awaiting manual backport to the v16.x-staging branch. and removed backport-requested-v16.x PRs awaiting manual backport to the v16.x-staging branch. labels Oct 9, 2021
targos pushed a commit to targos/node that referenced this pull request Oct 9, 2021
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

PR-URL: nodejs#39848
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos targos added backport-open-v16.x Indicate that the PR has an open backport. and removed backport-requested-v16.x PRs awaiting manual backport to the v16.x-staging branch. labels Oct 9, 2021
@targos targos added backported-to-v16.x PRs backported to the v16.x-staging branch. and removed backport-open-v16.x Indicate that the PR has an open backport. labels Nov 4, 2021
targos pushed a commit that referenced this pull request Nov 4, 2021
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

PR-URL: #39848
Backport-PR-URL: #40383
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Nov 26, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-to-v16.x PRs backported to the v16.x-staging branch. needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants