Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
src: port defineLazyProperties to native code#57081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
aduh95 commented Feb 15, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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 <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
codecovbot commented Feb 17, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
2086877 into nodejs:mainUh oh!
There was an error while loading. Please reload this page.
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 <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This allows us to have getters not observable from JS side. PR-URL: #57081 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
This allows us to have getters not observable from JS side, getting our implementation closer to the other runtimes.