GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||
GeezerVison is showing github.com — src: add MakeCallback() taking an Environment by nigrosimone · Pull Request #66510 · nodejs/node Conversation
|
|
Review requested:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
310f545 to
77584c5
Compare
|
Why still draft? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Now is ready
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
77584c5 to
7383b33
Compare
0bf95f3 to
c07db16
Compare
node::MakeCallback() looks up the Environment from the creation context of the callback on every call. An addon that calls into the same Environment many times, a server calling one handler per request for example, can now take it once with GetCurrentEnvironment() and pass it. The callback must belong to that Environment. Add a benchmark, napi/make_callback_env, comparing the two overloads. Refs: nodejs/performance#24 Signed-off-by: Nigro Simone <[email protected]>
c07db16 to
3278f89
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #66510 +/- ## ========================================== - Coverage 92.59% 90.50% -2.10% ========================================== Files 433 805 +372 Lines 200382 285810 +85428 Branches 30786 55184 +24398 ========================================== + Hits 185553 258681 +73128 - Misses 14486 17214 +2728 - Partials 343 9915 +9572
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 3872251 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Nigro Simone <[email protected]>
node::MakeCallback() looks up the Environment from the creation context of the callback on every call. An addon that calls into the same Environment many times, a server calling one handler per request for example, can now take it once with GetCurrentEnvironment() and pass it. The callback must belong to that Environment. Add a benchmark, napi/make_callback_env, comparing the two overloads. Refs: nodejs/performance#24 Signed-off-by: Nigro Simone <[email protected]> PR-URL: nodejs#66510 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.