summaryrefslogtreecommitdiff
path: root/ext/cache
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-11-19 17:13:38 +0900
committerGitHub <noreply@github.com>2023-11-19 09:13:38 +0100
commitc806fbdabe144c865612bbbc9ef596c9611c8310 (patch)
treeedb38d58720377580677ccbeffb693ffa1225cc4 /ext/cache
parenta7548afb58b9848e501a085455446f5de897ffaa (diff)
fix(ext,runtime): add missing custom inspections (#21219)
Diffstat (limited to 'ext/cache')
-rw-r--r--ext/cache/01_cache.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js
index e64178d89..d3514a3f2 100644
--- a/ext/cache/01_cache.js
+++ b/ext/cache/01_cache.js
@@ -8,6 +8,7 @@ const {
StringPrototypeSplit,
StringPrototypeTrim,
Symbol,
+ SymbolFor,
TypeError,
} = primordials;
import {
@@ -59,6 +60,10 @@ class CacheStorage {
cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1");
return await op_cache_storage_delete(cacheName);
}
+
+ [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
+ return `${this.constructor.name} ${inspect({}, inspectOptions)}`;
+ }
}
const _matchAll = Symbol("[[matchAll]]");
@@ -275,6 +280,10 @@ class Cache {
return responses;
}
+
+ [SymbolFor("Deno.privateCustomInspect")](inspect, inspectOptions) {
+ return `${this.constructor.name} ${inspect({}, inspectOptions)}`;
+ }
}
webidl.configureInterface(CacheStorage);