diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-04-12 21:58:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 19:58:57 +0000 |
commit | a3c5193a2e7d15bbfac390b220982561376e7322 (patch) | |
tree | 272620bdfec253f53ad9ddd787afa0139770e069 /ext/cache/01_cache.js | |
parent | 9c255b2843b3446c7ac6592eb8e318972eb5f1f8 (diff) |
refactor(ext/webidl): remove object from 'requiredArguments' (#18674)
This should produce a little less garbage and using an object here
wasn't really required.
---------
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Diffstat (limited to 'ext/cache/01_cache.js')
-rw-r--r-- | ext/cache/01_cache.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js index b789ee36a..48651dfb6 100644 --- a/ext/cache/01_cache.js +++ b/ext/cache/01_cache.js @@ -26,7 +26,7 @@ class CacheStorage { async open(cacheName) { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'open' on 'CacheStorage'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); cacheName = webidl.converters["DOMString"](cacheName, { prefix, context: "Argument 1", @@ -40,7 +40,7 @@ class CacheStorage { async has(cacheName) { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'has' on 'CacheStorage'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); cacheName = webidl.converters["DOMString"](cacheName, { prefix, context: "Argument 1", @@ -51,7 +51,7 @@ class CacheStorage { async delete(cacheName) { webidl.assertBranded(this, CacheStoragePrototype); const prefix = "Failed to execute 'delete' on 'CacheStorage'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); cacheName = webidl.converters["DOMString"](cacheName, { prefix, context: "Argument 1", @@ -75,7 +75,7 @@ class Cache { async put(request, response) { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'put' on 'Cache'"; - webidl.requiredArguments(arguments.length, 2, { prefix }); + webidl.requiredArguments(arguments.length, 2, prefix); request = webidl.converters["RequestInfo_DOMString"](request, { prefix, context: "Argument 1", @@ -165,7 +165,7 @@ class Cache { async match(request, options) { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'match' on 'Cache'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); request = webidl.converters["RequestInfo_DOMString"](request, { prefix, context: "Argument 1", @@ -182,7 +182,7 @@ class Cache { async delete(request, _options) { webidl.assertBranded(this, CachePrototype); const prefix = "Failed to execute 'delete' on 'Cache'"; - webidl.requiredArguments(arguments.length, 1, { prefix }); + webidl.requiredArguments(arguments.length, 1, prefix); request = webidl.converters["RequestInfo_DOMString"](request, { prefix, context: "Argument 1", |