From 59ca66a207ceb4699e1322ce22f953ac0f124f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 7 Aug 2020 22:47:18 +0200 Subject: Encode op errors as strings instead of numbers (#6977) --- cli/tsc/10_dispatch_json.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tsc/10_dispatch_json.js') diff --git a/cli/tsc/10_dispatch_json.js b/cli/tsc/10_dispatch_json.js index 3d19ea62a..a25014789 100644 --- a/cli/tsc/10_dispatch_json.js +++ b/cli/tsc/10_dispatch_json.js @@ -3,7 +3,7 @@ ((window) => { const core = window.Deno.core; const util = window.__bootstrap.util; - const getErrorClass = window.__bootstrap.errors.getErrorClass; + // Using an object without a prototype because `Map` was causing GC problems. const promiseTable = Object.create(null); let _nextPromiseId = 1; @@ -22,7 +22,7 @@ function unwrapResponse(res) { if (res.err != null) { - throw new (getErrorClass(res.err.kind))(res.err.message); + throw new (core.getErrorClass(res.err.kind))(res.err.message); } util.assert(res.ok != null); return res.ok; -- cgit v1.2.3