nothrow for move constructors#6536
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
|
@mikea Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
6b388bc to
8b08ed9
Compare
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds noexcept to move constructors across io-gate, io-own, trace, jsg, and iterator types, and introduces a GlobalToDelete wrapper to make v8::Global<v8::Data> noexcept-movable for the deferred destruction queue.
- [HIGH]
Ref::operator=(Ref<U>&&)is markednoexceptbut callsdestroy()which can throw (viaKJ_REQUIREindeferDestruction). - [MEDIUM]
AsyncGeneratormove constructor is markednoexceptbut callskj::rc<>()which heap-allocates and can throw. - [LOW]
Refmove constructors have anoexcept-unsafeaddStrongRef()fallback path. This is probably fine in practice given that moving non-strong refs is already documented as UB outside isolate lock, but worth noting.
This review was written by an AI assistant and may not be perfectly accurate. Please verify its suggestions independently.
|
The review has been posted to PR #6536. Here's a summary of the findings:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6536 +/- ##
==========================================
- Coverage 70.82% 70.81% -0.01%
==========================================
Files 435 435
Lines 122654 122659 +5
Branches 19267 19267
==========================================
- Hits 86869 86864 -5
- Misses 24371 24384 +13
+ Partials 11414 11411 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8b08ed9 to
38ce901
Compare
|
But wait — if Actually wait, I should check more carefully. The So the question for
For case (2), the Actually, looking at Since CI passes, I can conclude that Let me now do my final assessment and post the review. After thorough analysis, my previous review findings were:
On re-review, the code changes are all correct. The The All the LGTM |
similar to capnproto/capnproto#2620 attempts to make ExceptionOr move constructor noexcept.