From 31c2fea74af66d60dceab608b1cfdd9a3f08a7db Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Wed, 22 Mar 2023 18:09:51 -0700 Subject: A couple bug fixes (#2458) * fix valid status code range * update path * highwatermark option * throw DOMException * remove extra transpiler output * more transpiler tests * comment * get index not quickly * replace with `getDirectIndex` * update abort test * throw out of range status code * promisify test fix * move stdio test instance files * working crypto tests * allow duplicate set-cookie headers * different formatting * revert, fix will be in different pr * it is called * use min buffer size * fix url tests * null origin for other protocols * remove overload * add very large file test * await * coerce to int64 * 64 * no cast * add todo blob url tests * use `tryConvertToInt52` --- src/bun.js/bindings/ZigGlobalObject.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/bun.js/bindings/ZigGlobalObject.cpp') diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 7878b96a7..303be6190 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -959,8 +959,7 @@ JSC_DEFINE_HOST_FUNCTION(functionBTOA, if (!stringToEncode.isAllLatin1()) { auto scope = DECLARE_THROW_SCOPE(globalObject->vm()); - // TODO: DOMException - JSC::throwTypeError(globalObject, scope, "The string contains invalid characters."_s); + throwException(globalObject, scope, createDOMException(globalObject, ExceptionCode::InvalidCharacterError)); return JSC::JSValue::encode(JSC::JSValue {}); } @@ -991,8 +990,7 @@ static JSC_DEFINE_HOST_FUNCTION(functionATOB, }); if (!decodedData) { auto scope = DECLARE_THROW_SCOPE(globalObject->vm()); - // TODO: DOMException - JSC::throwTypeError(globalObject, scope, "The string contains invalid characters."_s); + throwException(globalObject, scope, createDOMException(globalObject, ExceptionCode::InvalidCharacterError)); return JSC::JSValue::encode(JSC::JSValue {}); } -- cgit v1.2.3