fix(core): Use primordials for methods (#18839)

I would like to get this change into Deno before merging
https://github.com/denoland/deno_lint/pull/1152
This commit is contained in:
Kenta Moriuchi 2023-05-01 22:30:02 +09:00 committed by GitHub
parent 94a148cdb6
commit 6728ad4203
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 378 additions and 270 deletions

View file

@ -37,6 +37,7 @@ const {
ObjectKeys,
ObjectPrototypeIsPrototypeOf,
RegExpPrototypeTest,
StringPrototypeStartsWith,
Symbol,
SymbolFor,
TypeError,
@ -90,7 +91,11 @@ function processUrlList(urlList, urlListProcessed) {
*/
function newInnerRequest(method, url, headerList, body, maybeBlob) {
let blobUrlEntry = null;
if (maybeBlob && typeof url === "string" && url.startsWith("blob:")) {
if (
maybeBlob &&
typeof url === "string" &&
StringPrototypeStartsWith(url, "blob:")
) {
blobUrlEntry = blobFromObjectUrl(url);
}
return {