diff options
author | 2023-07-01 17:37:44 -0700 | |
---|---|---|
committer | 2023-07-01 17:37:44 -0700 | |
commit | f00e2be548da21b9feaef178bb0ac22230801d6f (patch) | |
tree | c14555f7e4956743da06bb281fef5a37061a0faa /src/bun.js/bindings/helpers.h | |
parent | a4fe433db776e9ffcc532c8aeb9ea93ff0a3c02a (diff) | |
download | bun-f00e2be548da21b9feaef178bb0ac22230801d6f.tar.gz bun-f00e2be548da21b9feaef178bb0ac22230801d6f.tar.zst bun-f00e2be548da21b9feaef178bb0ac22230801d6f.zip |
Use `BunString` in `SystemError` (#3485)
* Use `BunString` in SystemError
* Use Bun::toStringRef when we will de-ref strings
* Move `napi_create_error` to C++ to support `code` being a Symbol potentially
* Update blob.zig
* Make this test less flaky
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/bindings/helpers.h')
-rw-r--r-- | src/bun.js/bindings/helpers.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/bindings/helpers.h b/src/bun.js/bindings/helpers.h index 402807f3d..00777c304 100644 --- a/src/bun.js/bindings/helpers.h +++ b/src/bun.js/bindings/helpers.h @@ -342,10 +342,10 @@ static const WTF::String toStringStatic(ZigString str) } if (isTaggedUTF16Ptr(str.ptr)) { - return WTF::String(WTF::ExternalStringImpl::createStatic(reinterpret_cast<const UChar*>(untag(str.ptr)), str.len)); + return WTF::String(AtomStringImpl::add(reinterpret_cast<const UChar*>(untag(str.ptr)), str.len)); } - return WTF::String(WTF::ExternalStringImpl::createStatic( + return WTF::String(AtomStringImpl::add( reinterpret_cast<const LChar*>(untag(str.ptr)), str.len)); } |