Skip to content

Conversation

@ThatOneBro
Copy link
Contributor

@ThatOneBro ThatOneBro commented Feb 12, 2023

Fixes #2053 , needs to be tested first

@Jarred-Sumner
Copy link
Collaborator

needs to be referenced in this function:

https://github.com/oven-sh/bun/blob/jarred/new-bundler/src/napi/napi.zig#L1440-L1446

then, needs to be added to this list:

https://github.com/oven-sh/bun/blob/jarred/new-bundler/src/symbols.txt#L140

auto globalObject = toJS(env);
JSC::JSValue value = JSC::JSValue::decode(reinterpret_cast<JSC::EncodedJSValue>(err));
JSC::JSObject* obj = value.getObject();
if (UNLIKELY(obj == nullptr || !obj->isErrorInstance())) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a subtle difference between an exception and an error and I'm not sure this satisfies that

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'm also not sure if the value passed here is expected to be a JSC::Exception

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can merge this since its better than the present state regardless

@Jarred-Sumner Jarred-Sumner marked this pull request as ready for review February 12, 2023 04:20
@Jarred-Sumner Jarred-Sumner merged commit 9eba1e0 into main Feb 12, 2023
@Jarred-Sumner Jarred-Sumner deleted the derrick/feat/add-napi-fatal-exception branch February 12, 2023 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nodejs-polars fails on supported NAPI function

3 participants