summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-03-10 11:23:14 +0900
committerGitHub <noreply@github.com>2024-03-10 02:23:14 +0000
commit84db80642a134cf0bd17accbc5c12f37e09e632e (patch)
tree2e19301d7e4759bf392bab369cc41f8571272796
parentf8543a9fd8d47753a607dfc04c121c49d1ac4294 (diff)
chore: replace 'call' to 'execute' in error messages (#22579)
Since both "call" and "execute" were used in error messages, I replaced them with "execute," which is more used.
-rw-r--r--ext/canvas/01_image.js2
-rw-r--r--ext/fetch/23_request.js2
-rw-r--r--ext/fetch/23_response.js4
-rw-r--r--ext/fetch/26_fetch.js4
-rw-r--r--ext/url/00_url.js2
-rw-r--r--ext/web/02_event.js2
-rw-r--r--ext/web/03_abort_signal.js4
-rw-r--r--ext/web/06_streams.js32
8 files changed, 26 insertions, 26 deletions
diff --git a/ext/canvas/01_image.js b/ext/canvas/01_image.js
index 844650dcb..a738f7992 100644
--- a/ext/canvas/01_image.js
+++ b/ext/canvas/01_image.js
@@ -163,7 +163,7 @@ function createImageBitmap(
sh = undefined,
options = undefined,
) {
- const prefix = "Failed to call 'createImageBitmap'";
+ const prefix = "Failed to execute 'createImageBitmap'";
// Overload: createImageBitmap(image [, options ])
if (arguments.length < 3) {
diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js
index 542bcb8bb..61c3b3f5d 100644
--- a/ext/fetch/23_request.js
+++ b/ext/fetch/23_request.js
@@ -466,7 +466,7 @@ class Request {
}
clone() {
- const prefix = "Failed to call 'Request.clone'";
+ const prefix = "Failed to execute 'Request.clone'";
webidl.assertBranded(this, RequestPrototype);
if (this[_body] && this[_body].unusable()) {
throw new TypeError("Body is unusable.");
diff --git a/ext/fetch/23_response.js b/ext/fetch/23_response.js
index fcf544d40..a3805a97d 100644
--- a/ext/fetch/23_response.js
+++ b/ext/fetch/23_response.js
@@ -256,7 +256,7 @@ class Response {
* @returns {Response}
*/
static redirect(url, status = 302) {
- const prefix = "Failed to call 'Response.redirect'";
+ const prefix = "Failed to execute 'Response.redirect'";
url = webidl.converters["USVString"](url, prefix, "Argument 1");
status = webidl.converters["unsigned short"](status, prefix, "Argument 2");
@@ -283,7 +283,7 @@ class Response {
* @returns {Response}
*/
static json(data = undefined, init = {}) {
- const prefix = "Failed to call 'Response.json'";
+ const prefix = "Failed to execute 'Response.json'";
data = webidl.converters.any(data);
init = webidl.converters["ResponseInit_fast"](init, prefix, "Argument 2");
diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js
index 9f90156c5..c4669e430 100644
--- a/ext/fetch/26_fetch.js
+++ b/ext/fetch/26_fetch.js
@@ -313,7 +313,7 @@ function fetch(input, init = {}) {
let opPromise = undefined;
// 1.
const result = new Promise((resolve, reject) => {
- const prefix = "Failed to call 'fetch'";
+ const prefix = "Failed to execute 'fetch'";
webidl.requiredArguments(arguments.length, 1, prefix);
// 2.
const requestObject = new Request(input, init);
@@ -425,7 +425,7 @@ function handleWasmStreaming(source, rid) {
try {
const res = webidl.converters["Response"](
source,
- "Failed to call 'WebAssembly.compileStreaming'",
+ "Failed to execute 'WebAssembly.compileStreaming'",
"Argument 1",
);
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index 6559432e5..3b081218b 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -395,7 +395,7 @@ class URL {
* @param {string} [base]
*/
static canParse(url, base = undefined) {
- const prefix = "Failed to call 'URL.canParse'";
+ const prefix = "Failed to execute 'URL.canParse'";
webidl.requiredArguments(arguments.length, 1, prefix);
url = webidl.converters.DOMString(url, prefix, "Argument 1");
if (base !== undefined) {
diff --git a/ext/web/02_event.js b/ext/web/02_event.js
index 026e46374..8f1c963e3 100644
--- a/ext/web/02_event.js
+++ b/ext/web/02_event.js
@@ -1507,7 +1507,7 @@ function checkThis(thisArg) {
// https://html.spec.whatwg.org/#dom-reporterror
function reportError(error) {
checkThis(this);
- const prefix = "Failed to call 'reportError'";
+ const prefix = "Failed to execute 'reportError'";
webidl.requiredArguments(arguments.length, 1, prefix);
reportException(error);
}
diff --git a/ext/web/03_abort_signal.js b/ext/web/03_abort_signal.js
index 2bca29529..e64a34db7 100644
--- a/ext/web/03_abort_signal.js
+++ b/ext/web/03_abort_signal.js
@@ -83,7 +83,7 @@ const illegalConstructorKey = Symbol("illegalConstructorKey");
class AbortSignal extends EventTarget {
static any(signals) {
- const prefix = "Failed to call 'AbortSignal.any'";
+ const prefix = "Failed to execute 'AbortSignal.any'";
webidl.requiredArguments(arguments.length, 1, prefix);
return createDependentAbortSignal(signals, prefix);
}
@@ -98,7 +98,7 @@ class AbortSignal extends EventTarget {
}
static timeout(millis) {
- const prefix = "Failed to call 'AbortSignal.timeout'";
+ const prefix = "Failed to execute 'AbortSignal.timeout'";
webidl.requiredArguments(arguments.length, 1, prefix);
millis = webidl.converters["unsigned long long"](
millis,
diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js
index fa9e4b59e..e53184453 100644
--- a/ext/web/06_streams.js
+++ b/ext/web/06_streams.js
@@ -573,7 +573,7 @@ function extractSizeAlgorithm(strategy) {
[chunk],
undefined,
webidl.converters["unrestricted double"],
- "Failed to call `sizeAlgorithm`",
+ "Failed to execute `sizeAlgorithm`",
);
}
@@ -3551,7 +3551,7 @@ function setUpReadableByteStreamControllerFromUnderlyingSource(
[controller],
underlyingSource,
webidl.converters.any,
- "Failed to call 'startAlgorithm' on 'ReadableByteStreamController'",
+ "Failed to execute 'startAlgorithm' on 'ReadableByteStreamController'",
);
}
if (underlyingSourceDict.pull !== undefined) {
@@ -3561,7 +3561,7 @@ function setUpReadableByteStreamControllerFromUnderlyingSource(
[controller],
underlyingSource,
webidl.converters["Promise<undefined>"],
- "Failed to call 'pullAlgorithm' on 'ReadableByteStreamController'",
+ "Failed to execute 'pullAlgorithm' on 'ReadableByteStreamController'",
true,
);
}
@@ -3572,7 +3572,7 @@ function setUpReadableByteStreamControllerFromUnderlyingSource(
[reason],
underlyingSource,
webidl.converters["Promise<undefined>"],
- "Failed to call 'cancelAlgorithm' on 'ReadableByteStreamController'",
+ "Failed to execute 'cancelAlgorithm' on 'ReadableByteStreamController'",
true,
);
}
@@ -3664,7 +3664,7 @@ function setUpReadableStreamDefaultControllerFromUnderlyingSource(
[controller],
underlyingSource,
webidl.converters.any,
- "Failed to call 'startAlgorithm' on 'ReadableStreamDefaultController'",
+ "Failed to execute 'startAlgorithm' on 'ReadableStreamDefaultController'",
);
}
if (underlyingSourceDict.pull !== undefined) {
@@ -3674,7 +3674,7 @@ function setUpReadableStreamDefaultControllerFromUnderlyingSource(
[controller],
underlyingSource,
webidl.converters["Promise<undefined>"],
- "Failed to call 'pullAlgorithm' on 'ReadableStreamDefaultController'",
+ "Failed to execute 'pullAlgorithm' on 'ReadableStreamDefaultController'",
true,
);
}
@@ -3685,7 +3685,7 @@ function setUpReadableStreamDefaultControllerFromUnderlyingSource(
[reason],
underlyingSource,
webidl.converters["Promise<undefined>"],
- "Failed to call 'cancelAlgorithm' on 'ReadableStreamDefaultController'",
+ "Failed to execute 'cancelAlgorithm' on 'ReadableStreamDefaultController'",
true,
);
}
@@ -3791,7 +3791,7 @@ function setUpTransformStreamDefaultControllerFromTransformer(
[chunk, controller],
transformer,
webidl.converters["Promise<undefined>"],
- "Failed to call 'transformAlgorithm' on 'TransformStreamDefaultController'",
+ "Failed to execute 'transformAlgorithm' on 'TransformStreamDefaultController'",
true,
);
}
@@ -3802,7 +3802,7 @@ function setUpTransformStreamDefaultControllerFromTransformer(
[controller],
transformer,
webidl.converters["Promise<undefined>"],
- "Failed to call 'flushAlgorithm' on 'TransformStreamDefaultController'",
+ "Failed to execute 'flushAlgorithm' on 'TransformStreamDefaultController'",
true,
);
}
@@ -3813,7 +3813,7 @@ function setUpTransformStreamDefaultControllerFromTransformer(
[reason],
transformer,
webidl.converters["Promise<undefined>"],
- "Failed to call 'cancelAlgorithm' on 'TransformStreamDefaultController'",
+ "Failed to execute 'cancelAlgorithm' on 'TransformStreamDefaultController'",
true,
);
}
@@ -3907,7 +3907,7 @@ function setUpWritableStreamDefaultControllerFromUnderlyingSink(
[controller],
underlyingSink,
webidl.converters.any,
- "Failed to call 'startAlgorithm' on 'WritableStreamDefaultController'",
+ "Failed to execute 'startAlgorithm' on 'WritableStreamDefaultController'",
);
}
if (underlyingSinkDict.write !== undefined) {
@@ -3917,7 +3917,7 @@ function setUpWritableStreamDefaultControllerFromUnderlyingSink(
[chunk, controller],
underlyingSink,
webidl.converters["Promise<undefined>"],
- "Failed to call 'writeAlgorithm' on 'WritableStreamDefaultController'",
+ "Failed to execute 'writeAlgorithm' on 'WritableStreamDefaultController'",
true,
);
}
@@ -3928,7 +3928,7 @@ function setUpWritableStreamDefaultControllerFromUnderlyingSink(
[],
underlyingSink,
webidl.converters["Promise<undefined>"],
- "Failed to call 'closeAlgorithm' on 'WritableStreamDefaultController'",
+ "Failed to execute 'closeAlgorithm' on 'WritableStreamDefaultController'",
true,
);
}
@@ -3939,7 +3939,7 @@ function setUpWritableStreamDefaultControllerFromUnderlyingSink(
[reason],
underlyingSink,
webidl.converters["Promise<undefined>"],
- "Failed to call 'abortAlgorithm' on 'WritableStreamDefaultController'",
+ "Failed to execute 'abortAlgorithm' on 'WritableStreamDefaultController'",
true,
);
}
@@ -5196,7 +5196,7 @@ class ReadableStream {
webidl.requiredArguments(
arguments.length,
1,
- "Failed to call 'ReadableStream.from'",
+ "Failed to execute 'ReadableStream.from'",
);
asyncIterable = webidl.converters.any(asyncIterable);
@@ -6209,7 +6209,7 @@ class TransformStream {
[this[_controller]],
transformer,
webidl.converters.any,
- "Failed to call 'start' on 'TransformStreamDefaultController'",
+ "Failed to execute 'start' on 'TransformStreamDefaultController'",
),
);
} else {