diff options
Diffstat (limited to 'ext/cache/01_cache.js')
-rw-r--r-- | ext/cache/01_cache.js | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js index 48651dfb6..8cbf540fa 100644 --- a/ext/cache/01_cache.js +++ b/ext/cache/01_cache.js @@ -27,10 +27,7 @@ class CacheStorage { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'open' on 'CacheStorage'"; webidl.requiredArguments(arguments.length, 1, prefix); - cacheName = webidl.converters["DOMString"](cacheName, { - prefix, - context: "Argument 1", - }); + cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1"); const cacheId = await core.opAsync("op_cache_storage_open", cacheName); const cache = webidl.createBranded(Cache); cache[_id] = cacheId; @@ -41,10 +38,7 @@ class CacheStorage { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'has' on 'CacheStorage'"; webidl.requiredArguments(arguments.length, 1, prefix); - cacheName = webidl.converters["DOMString"](cacheName, { - prefix, - context: "Argument 1", - }); + cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1"); return await core.opAsync("op_cache_storage_has", cacheName); } @@ -52,10 +46,7 @@ class CacheStorage { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'delete' on 'CacheStorage'"; webidl.requiredArguments(arguments.length, 1, prefix); - cacheName = webidl.converters["DOMString"](cacheName, { - prefix, - context: "Argument 1", - }); + cacheName = webidl.converters["DOMString"](cacheName, prefix, "Argument 1"); return await core.opAsync("op_cache_storage_delete", cacheName); } } @@ -76,14 +67,12 @@ class Cache { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'put' on 'Cache'"; webidl.requiredArguments(arguments.length, 2, prefix); - request = webidl.converters["RequestInfo_DOMString"](request, { - prefix, - context: "Argument 1", - }); - response = webidl.converters["Response"](response, { + request = webidl.converters["RequestInfo_DOMString"]( + request, prefix, - context: "Argument 2", - }); + "Argument 1", + ); + response = webidl.converters["Response"](response, prefix, "Argument 2"); // Step 1. let innerRequest = null; // Step 2. @@ -166,10 +155,11 @@ class Cache { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'match' on 'Cache'"; webidl.requiredArguments(arguments.length, 1, prefix); - request = webidl.converters["RequestInfo_DOMString"](request, { + request = webidl.converters["RequestInfo_DOMString"]( + request, prefix, - context: "Argument 1", - }); + "Argument 1", + ); const p = await this[_matchAll](request, options); if (p.length > 0) { return p[0]; @@ -183,10 +173,11 @@ class Cache { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'delete' on 'Cache'"; webidl.requiredArguments(arguments.length, 1, prefix); - request = webidl.converters["RequestInfo_DOMString"](request, { + request = webidl.converters["RequestInfo_DOMString"]( + request, prefix, - context: "Argument 1", - }); + "Argument 1", + ); // Step 1. let r = null; // Step 2. |