summaryrefslogtreecommitdiff
path: root/runtime/js/99_main.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-05-03 17:30:41 +0200
committerGitHub <noreply@github.com>2021-05-03 17:30:41 +0200
commitd21380728f7d16f1a5b7362b2e2b5c46ff8a8070 (patch)
tree190e3a83254cf1d4c36ec03d4ce688cf657d27c8 /runtime/js/99_main.js
parent7bc03523d075ae4a5a508f9bdf59a1686f7bcdce (diff)
fix(core): error registration could pollute constructors (#10422)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r--runtime/js/99_main.js4
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");
},
);
}