diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-05-03 17:30:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-03 17:30:41 +0200 |
commit | d21380728f7d16f1a5b7362b2e2b5c46ff8a8070 (patch) | |
tree | 190e3a83254cf1d4c36ec03d4ce688cf657d27c8 /runtime/js | |
parent | 7bc03523d075ae4a5a508f9bdf59a1686f7bcdce (diff) |
fix(core): error registration could pollute constructors (#10422)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/99_main.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index d2626a07d..8d75ea739 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -184,10 +184,10 @@ delete Object.prototype.__proto__; core.registerErrorClass("Http", errors.Http); core.registerErrorClass("Busy", errors.Busy); core.registerErrorClass("NotSupported", errors.NotSupported); - core.registerErrorClass( + core.registerErrorBuilder( "DOMExceptionOperationError", function DOMExceptionOperationError(msg) { - DOMException.prototype.constructor.call(this, msg, "OperationError"); + return new DOMException(msg, "OperationError"); }, ); } |