mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
fix(core): error registration could pollute constructors (#10422)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
This commit is contained in:
parent
7bc03523d0
commit
d21380728f
4 changed files with 85 additions and 15 deletions
|
@ -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");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue