summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/cache/01_cache.js2
-rw-r--r--ext/console/01_console.js3
-rw-r--r--ext/fetch/21_formdata.js3
-rw-r--r--ext/fetch/22_body.js1
-rw-r--r--ext/http/00_serve.js6
-rw-r--r--ext/url/00_url.js1
-rw-r--r--ext/web/06_streams.js1
-rw-r--r--ext/web/09_file.js1
-rw-r--r--ext/websocket/01_websocket.js1
9 files changed, 15 insertions, 4 deletions
diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js
index 9b5404acb..9476420ef 100644
--- a/ext/cache/01_cache.js
+++ b/ext/cache/01_cache.js
@@ -128,6 +128,7 @@ class Cache {
"op_cache_put",
{
cacheId: this[_id],
+ // deno-lint-ignore prefer-primordials
requestUrl: reqUrl.toString(),
responseHeaders: innerResponse.headerList,
requestHeaders: innerRequest.headerList,
@@ -243,6 +244,7 @@ class Cache {
"op_cache_match",
{
cacheId: this[_id],
+ // deno-lint-ignore prefer-primordials
requestUrl: url.toString(),
requestHeaders: innerRequest.headerList,
},
diff --git a/ext/console/01_console.js b/ext/console/01_console.js
index 11b6c549c..6cf3c6dca 100644
--- a/ext/console/01_console.js
+++ b/ext/console/01_console.js
@@ -37,6 +37,7 @@ const {
Error,
ErrorCaptureStackTrace,
ErrorPrototype,
+ ErrorPrototypeToString,
FunctionPrototypeBind,
FunctionPrototypeCall,
FunctionPrototypeToString,
@@ -1578,7 +1579,7 @@ function inspectError(value, ctx) {
if (stack?.includes("\n at")) {
finalMessage += stack;
} else {
- finalMessage += `[${stack || value.toString()}]`;
+ finalMessage += `[${stack || ErrorPrototypeToString(value)}]`;
}
}
finalMessage += ArrayPrototypeJoin(
diff --git a/ext/fetch/21_formdata.js b/ext/fetch/21_formdata.js
index 1ddd5f656..1f0f00088 100644
--- a/ext/fetch/21_formdata.js
+++ b/ext/fetch/21_formdata.js
@@ -31,6 +31,7 @@ const {
SafeRegExp,
Symbol,
StringFromCharCode,
+ StringPrototypeCharCodeAt,
StringPrototypeTrim,
StringPrototypeSlice,
StringPrototypeSplit,
@@ -368,7 +369,7 @@ function parseContentDisposition(value) {
function decodeLatin1StringAsUtf8(latin1String) {
const buffer = new Uint8Array(latin1String.length);
for (let i = 0; i < latin1String.length; i++) {
- buffer[i] = latin1String.charCodeAt(i);
+ buffer[i] = StringPrototypeCharCodeAt(latin1String, i);
}
return core.decode(buffer);
}
diff --git a/ext/fetch/22_body.js b/ext/fetch/22_body.js
index 82703af76..9fe00b144 100644
--- a/ext/fetch/22_body.js
+++ b/ext/fetch/22_body.js
@@ -424,6 +424,7 @@ function extractBody(object) {
ObjectPrototypeIsPrototypeOf(URLSearchParamsPrototype, object)
) {
// TODO(@satyarohith): not sure what primordial here.
+ // deno-lint-ignore prefer-primordials
source = object.toString();
contentType = "application/x-www-form-urlencoded;charset=UTF-8";
} else if (ObjectPrototypeIsPrototypeOf(ReadableStreamPrototype, object)) {
diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js
index dbdc22705..ba8080e27 100644
--- a/ext/http/00_serve.js
+++ b/ext/http/00_serve.js
@@ -37,6 +37,8 @@ import {
import { listen, TcpConn } from "ext:deno_net/01_net.js";
import { listenTls } from "ext:deno_net/02_tls.js";
const {
+ ArrayPrototypeFlat,
+ ArrayPrototypePush,
ObjectPrototypeIsPrototypeOf,
PromisePrototypeCatch,
SafeSet,
@@ -337,7 +339,7 @@ class InnerRequest {
const headers = [];
const reqHeaders = op_http_get_request_headers(this.#slabId);
for (let i = 0; i < reqHeaders.length; i += 2) {
- headers.push([reqHeaders[i], reqHeaders[i + 1]]);
+ ArrayPrototypePush(headers, [reqHeaders[i], reqHeaders[i + 1]]);
}
return headers;
}
@@ -575,7 +577,7 @@ function mapToCallback(context, callback, onError) {
if (headers.length == 1) {
op_http_set_response_header(req, headers[0][0], headers[0][1]);
} else {
- op_http_set_response_headers(req, headers.flat());
+ op_http_set_response_headers(req, ArrayPrototypeFlat(headers));
}
}
diff --git a/ext/url/00_url.js b/ext/url/00_url.js
index b4bc34b92..49dd2c46f 100644
--- a/ext/url/00_url.js
+++ b/ext/url/00_url.js
@@ -149,6 +149,7 @@ class URLSearchParams {
if (url === null) {
return;
}
+ // deno-lint-ignore prefer-primordials
url[_updateUrlSearch](this.toString());
}
diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js
index c0cbb3049..21207c372 100644
--- a/ext/web/06_streams.js
+++ b/ext/web/06_streams.js
@@ -1261,6 +1261,7 @@ function readableByteStreamControllerEnqueueClonedChunkToQueue(
);
} else {
// TODO(lucacasonato): add SharedArrayBuffer to primordials
+ // deno-lint-ignore prefer-primordials
cloneResult = buffer.slice(byteOffset, byteOffset + byteLength);
}
} catch (e) {
diff --git a/ext/web/09_file.js b/ext/web/09_file.js
index d65a512f9..79a9c41b2 100644
--- a/ext/web/09_file.js
+++ b/ext/web/09_file.js
@@ -326,6 +326,7 @@ class Blob {
relativeStart -= size;
relativeEnd -= size;
} else {
+ // deno-lint-ignore prefer-primordials
const chunk = part.slice(
relativeStart,
MathMin(part.size, relativeEnd),
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js
index c4c686b9c..e71cae44a 100644
--- a/ext/websocket/01_websocket.js
+++ b/ext/websocket/01_websocket.js
@@ -344,6 +344,7 @@ class WebSocket extends EventTarget {
if (ObjectPrototypeIsPrototypeOf(BlobPrototype, data)) {
PromisePrototypeThen(
+ // deno-lint-ignore prefer-primordials
data.slice().arrayBuffer(),
(ab) =>
sendTypedArray(