Conversation
lib/internal/async_hooks.js
Outdated
There was a problem hiding this comment.
I'm not sure if I like these kinds of abstractions, but for sure it seems that from and to should be switched.
There was a problem hiding this comment.
Maybe call it copyHooks? Maybe it’s just my C background that sees parallels to memcpy() & co here, but it seems closer to what’s happening than setHooks?
There was a problem hiding this comment.
I like copyHooks, I'll update the PR. Thanks
There was a problem hiding this comment.
@AndreasMadsen I'll also changed the parameters, so it will be copyHooks(destination, source).
lib/internal/async_hooks.js
Outdated
There was a problem hiding this comment.
Maybe call it copyHooks? Maybe it’s just my C background that sees parallels to memcpy() & co here, but it seems closer to what’s happening than setHooks?
apapirovski
left a comment
There was a problem hiding this comment.
+1 on naming it copyHooks
This commit introduces a copyHooks function that can be used by storeActiveHooks and restoreActiveHooks to remove some code duplication.
2045c5e to
657a33d
Compare
|
Rebased and updated CI: https://ci.nodejs.org/job/node-test-pull-request/13726/ |
node-test-commit failure looks unrelated06:55:35 Building addon /home/iojs/build/workspace/node-test-commit-linux/nodes/debian8-64/test/addons-napi/test_array/
06:55:35 gyp info it worked if it ends with ok
06:55:35 gyp info using node-gyp@3.6.2
06:55:35 gyp info using node@10.0.0-pre | linux | x64
06:55:35 gyp info chdir /home/iojs/build/workspace/node-test-commit-linux/nodes/debian8-64/test/addons-napi/test_array/
06:55:35 Aborted (core dumped)
06:55:35 Makefile:369: recipe for target 'test/addons-napi/.buildstamp' failed
06:55:35 make[1]: *** [test/addons-napi/.buildstamp] Error 1
06:55:35 make[1]: *** Waiting for unfinished jobs....
06:55:49 |
|
Landed in 5a4a1cb. |
This commit introduces a copyHooks function that can be used by storeActiveHooks and restoreActiveHooks to remove some code duplication. PR-URL: #19391 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit introduces a copyHooks function that can be used by storeActiveHooks and restoreActiveHooks to remove some code duplication. PR-URL: #19391 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit introduces a copyHooks function that can be used by storeActiveHooks and restoreActiveHooks to remove some code duplication. PR-URL: #19391 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
This commit introduces a copyHooks function that can be used by
storeActiveHooks and restoreActiveHooks to remove some code duplication.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes