Conversation
If users invoke napi_delete_async_work in their async work complete callback
yorkie
left a comment
There was a problem hiding this comment.
This looks weird, the implemented copy should fail on this one: https://github.com/Rokid/ShadowNode/blob/1a7a7649be26330cebde42131808142eaede5b3b/test/addons-napi/test_async/test_async.cc#L68, I think we should revisit it.
| } | ||
| } | ||
|
|
||
| iotjs_process_next_tick(); |
There was a problem hiding this comment.
Please add a regression on https://github.com/Rokid/ShadowNode/blob/1a7a7649be26330cebde42131808142eaede5b3b/test/napi/napi_async.test.js :)
There was a problem hiding this comment.
tests are already included https://github.com/Rokid/ShadowNode/blob/1a7a7649be26330cebde42131808142eaede5b3b/test/napi/napi_async.test.js#L12
Yet it doesn't expose the problem as expected though.
|
Ah, we did skip the test_async/test.js at https://github.com/Rokid/ShadowNode/blob/1a7a7649be26330cebde42131808142eaede5b3b/test/napi-testsets.json#L15 @legendecas Could you please remove the skip flag now? |
|
@yorkie it's not possible to enable |
Let's support it, child process Sync APIs should be more useful on our target devices as a script. |
|
Or could we have the patches to N-API Test Suite just like the openwrt/buildroot package, which provides a way to cover more NTS without any forks with source? @mhdawson @gabrielschulhof, I think this tooling could also be included into our future NTS repository, and it helps implementor to get more coverages. |
|
@legendecas we should avoid any case that uses freed blocks, so please set the pointer to be null after it gets freed at: https://github.com/Rokid/ShadowNode/blob/c56f4f96bd53259befece9f2ea996fe784f98a7e/src/napi/node_api_async.c#L101 And use |
* master: build: use CMAKE_INSTALL_PREFIX instead of custom install command (#391) child_process: introduce binary protocol to optimizing performance (#393) iotjs: cache parsed dump table for error.stack at runtime (#392) jerry: merge a59cf4f from upstream to optimize the function call (#381) promise: optimize the performance on .then and static resolve (#385) jerry: set prototype/constructor for external functions (#386) process: add shebang parser supports (#379) napi: fix complete callback segv/ticks on async-work (#380) jerry: pass regression-test-issue-2105 for heapdump (#382) tls, mqtts: fix connection not be actively disconnected (#375) websocket: fix the crash due to http exception (#376) process: add signal events support (#372)
Checklist
npm testpasses