summaryrefslogtreecommitdiff
path: root/extensions/web/09_file.js
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2021-07-08 09:43:36 -0400
committerGitHub <noreply@github.com>2021-07-08 09:43:36 -0400
commit5fa58c92165e23386b8ed3c3079103997fe1bef9 (patch)
treed7efc34a11322d10f2749b5083cd84fa1b4a18d6 /extensions/web/09_file.js
parent5e092b19fe113bdecd36b4e0184c82f4b3343bca (diff)
fix: inspecting prototypes of built-ins with custom inspect implementations should not throw (#11308)
Diffstat (limited to 'extensions/web/09_file.js')
-rw-r--r--extensions/web/09_file.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/extensions/web/09_file.js b/extensions/web/09_file.js
index a39b380a6..516e80adf 100644
--- a/extensions/web/09_file.js
+++ b/extensions/web/09_file.js
@@ -34,6 +34,7 @@
TypeError,
Uint8Array,
} = window.__bootstrap.primordials;
+ const consoleInternal = window.__bootstrap.console;
// TODO(lucacasonato): this needs to not be hardcoded and instead depend on
// host os.
@@ -362,7 +363,14 @@
}
[SymbolFor("Deno.customInspect")](inspect) {
- return `Blob ${inspect({ size: this.size, type: this.#type })}`;
+ return inspect(consoleInternal.createFilteredInspectProxy({
+ object: this,
+ evaluate: this instanceof Blob,
+ keys: [
+ "size",
+ "type",
+ ],
+ }));
}
}