diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-02-01 18:06:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 18:06:11 +0100 |
commit | 8176a4d1663529fb8aeebf7734c4994fa1d583f4 (patch) | |
tree | 94c7d6eb2679e641f59cf78640340f5b7af0022e /ext/url/01_urlpattern.js | |
parent | abf89f8c4675ed78c992fafd6d758bf4bfca8a1a (diff) |
refactor: primordials for instanceof (#13527)
Diffstat (limited to 'ext/url/01_urlpattern.js')
-rw-r--r-- | ext/url/01_urlpattern.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ext/url/01_urlpattern.js b/ext/url/01_urlpattern.js index 19883311f..51968e68a 100644 --- a/ext/url/01_urlpattern.js +++ b/ext/url/01_urlpattern.js @@ -85,42 +85,42 @@ } get protocol() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].protocol.patternString; } get username() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].username.patternString; } get password() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].password.patternString; } get hostname() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].hostname.patternString; } get port() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].port.patternString; } get pathname() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].pathname.patternString; } get search() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].search.patternString; } get hash() { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); return this[_components].hash.patternString; } @@ -130,7 +130,7 @@ * @returns {boolean} */ test(input, baseURL = undefined) { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); const prefix = "Failed to execute 'test' on 'URLPattern'"; webidl.requiredArguments(arguments.length, 1, { prefix }); input = webidl.converters.URLPatternInput(input, { @@ -170,7 +170,7 @@ * @returns {URLPatternResult | null} */ exec(input, baseURL = undefined) { - webidl.assertBranded(this, URLPattern); + webidl.assertBranded(this, URLPatternPrototype); const prefix = "Failed to execute 'exec' on 'URLPattern'"; webidl.requiredArguments(arguments.length, 1, { prefix }); input = webidl.converters.URLPatternInput(input, { @@ -241,6 +241,7 @@ } webidl.configurePrototype(URLPattern); + const URLPatternPrototype = URLPattern.prototype; webidl.converters.URLPatternInit = webidl .createDictionaryConverter("URLPatternInit", [ |