Kasper Isager Dalsgarð
Kasper Isager Dalsgarð
My own use case is replacing the implementation of this function: https://github.com/holepunchto/libqjs/blob/eff318a3c97839b55880bc52cc92ee6528005811/src/qjs.c#L2846-L2891. The function behaves the same as the various typed array constructors in that it takes an arraybuffer, an...
@chqrlie The `js_typedarray_type_t` enum is ABI compatible with `napi_typedarray_type` to make conversion a simple cast: https://github.com/nodejs/node/blob/8e6a45b3e5763bb065e4aa6f31f20e5b7cb58760/src/js_native_api_types.h#L94-L106
Yep, for V8 we have to fetch the corresponding constructor function, it doesn't have a type enum: https://github.com/holepunchto/libjs/blob/41ba260766291ca2477a1473c652d5a5494e3f7d/src/js.cc#L3974-L4001
I just hit this as well while trying to compile the library using `clang-cl`.
Would it be reasonable to make the contents of `current_exception` defined at all times so one can actually test for pending exceptions?
That's an awfully good point! Initialising it to `JS_UNINITIALIZED` instead and letting that mean "no pending exception" sounds like a plan, I can put together a PR.
@chqrlie Isn't `JS_UNDEFINED` it's own thing?
I'm looking for this as well. My use case is a `provisioner` block that is used in several different resources for setting up some base configuration (made up VPN example):...
I just hit this as well with the addition that I also have to postpone my first write from the publisher as the write is otherwise dropped.
It looks like I was holding it wrong, at least in part: I was binding the publisher and connecting the subscriber instead of the other way around. The bind must...