From e55dee7fd894f705a0268a4734b00197021f0617 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Sat, 19 Mar 2022 13:57:37 +0100 Subject: refactor: cleanup assert() & AssertionError definitions (#13859) --- runtime/js/06_util.js | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'runtime/js/06_util.js') diff --git a/runtime/js/06_util.js b/runtime/js/06_util.js index c643f758a..277e83ec5 100644 --- a/runtime/js/06_util.js +++ b/runtime/js/06_util.js @@ -4,7 +4,6 @@ ((window) => { const { decodeURIComponent, - Error, ObjectPrototypeIsPrototypeOf, Promise, SafeArrayIterator, @@ -34,19 +33,6 @@ } } - class AssertionError extends Error { - constructor(msg) { - super(msg); - this.name = "AssertionError"; - } - } - - function assert(cond, msg = "Assertion failed.") { - if (!cond) { - throw new AssertionError(msg); - } - } - function createResolvable() { let resolve; let reject; @@ -154,8 +140,6 @@ log, setLogDebug, createResolvable, - assert, - AssertionError, pathFromURL, writable, nonEnumerable, -- cgit v1.2.3