Uh oh!
There was an error while loading. Please reload this page.
src: port defineLazyProperties to native code - #57081
Conversation
This allows us to have getters not observable from JS side.
nodejs-github-bot
commented
Feb 15, 2025
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: James M Snell <jasnell@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| Isolate* isolate = args.GetIsolate(); | ||
| auto target = args[0].As<Object>(); | ||
| if (target |
There was a problem hiding this comment.
I think instead of doing it in JS -> C++, we might as well just do it in BootstrapRealm() implementations directly.
There was a problem hiding this comment.
I'll try to do it in a follow up if no one beats me to it
Uh oh!
There was an error while loading. Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #57081 +/- ##
==========================================
- Coverage 89.08% 89.06% -0.02%
==========================================
Files 665 665 Lines 193248 193273 +25 Branches 37229 37235 +6 ==========================================
- Hits 172157 172141 -16 - Misses 13806 13815 +9 - Partials 7285 7317 +32
|
nodejs-github-bot
commented
Feb 18, 2025
nodejs-github-bot
commented
Feb 18, 2025
joyeecheung
left a comment
There was a problem hiding this comment.
LGTM with a suggestion, can be done in a follow up though
| auto context = isolate->GetCurrentContext(); | ||
| Local<Value> arg = info.Data(); | ||
| Local<Value> require_result; | ||
| if (!realm->builtin_module_require() |
There was a problem hiding this comment.
It might be worth to cache the modules in C++ or just pass the BuiltinModule.map to C++ land so that multiple exports from the same module do not lead to repeated call backs into the JS require.
nodejs-github-bot
commented
Feb 18, 2025
Landed in 2086877 |
This allows us to have getters not observable from JS side. PR-URL: nodejs#57081 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This allows us to have getters not observable from JS side, getting our implementation closer to the other runtimes.