diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-01-27 13:36:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 13:36:36 +0100 |
commit | 884143218fad0e18f7553aaf079d52de703f7601 (patch) | |
tree | 9b9e9d30ea647041438ef8fa974b8d4234cabf73 /ext/url/01_urlpattern.js | |
parent | dcf8f144ab0516936bfa4e93357d71f1732d880e (diff) |
refactor: update runtime code for primordial checks for "instanceof" (#13497)
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", [ |