src: port defineLazyProperties to native code#57081
src: port defineLazyProperties to native code#57081nodejs-github-bot merged 12 commits intonodejs:mainfrom
defineLazyProperties to native code#57081Conversation
This allows us to have getters not observable from JS side.
|
Review requested:
|
Co-authored-by: James M Snell <jasnell@gmail.com>
| 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
This reverts commit af7bb75.
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
|
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.
|
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.