-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Add a [[ErrorData]]
internal slot to DOMException
#58138
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
Conversation
66141cf
to
75b30c2
Compare
[[ErrorData]]
internal slot to DOMException[[ErrorData]]
internal slot to DOMException
75b30c2
to
865c576
Compare
Maybe a better way to fix this is to call bool IsNodeError(Isolate* isolate, Local<Object> obj) {
return IsDOMException(isolate, obj); // implementation of IsDOMException left as an exercise to the reader
} Probably means implementing DOMException as an ObjectTemplate/FunctionTemplate in C++ land. |
IMO, this PR should be merged before Node.js v24 is released. How about that? |
Like @bnoordhuis suggested, for |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #58138 +/- ##
==========================================
+ Coverage 89.64% 90.10% +0.45%
==========================================
Files 630 630
Lines 186470 186623 +153
Branches 36305 36628 +323
==========================================
+ Hits 167160 168151 +991
+ Misses 12073 11252 -821
+ Partials 7237 7220 -17
🚀 New features to boost your workflow:
|
It appears that we should wait for #57372. |
Original commit message: [objects] allow host defined serializer of JSError Allow host defined serializer and deserializer of JSError in ValueSerializer API. This allows hosts that implement DOMException in JS to support `Error.isError` proposal and `structuredClone`. Refs: #58691 Change-Id: I022821c9abd659970c4d449b3c69c5fb54d0618a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6637876 Reviewed-by: Camillo Bruni <[email protected]> Commit-Queue: Chengzhong Wu <[email protected]> Cr-Commit-Position: refs/heads/main@{#100894} Refs: v8/v8@e3df60f PR-URL: #58691 Fixes: #56497 Refs: #58138 Reviewed-By: Jason Zhang <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]>
Co-Authored-By: Kenta Moriuchi <[email protected]> PR-URL: #58691 Fixes: #56497 Refs: v8/v8@e3df60f Refs: #58138 Reviewed-By: Jason Zhang <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]>
Original commit message: [objects] allow host defined serializer of JSError Allow host defined serializer and deserializer of JSError in ValueSerializer API. This allows hosts that implement DOMException in JS to support `Error.isError` proposal and `structuredClone`. Refs: #58691 Change-Id: I022821c9abd659970c4d449b3c69c5fb54d0618a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6637876 Reviewed-by: Camillo Bruni <[email protected]> Commit-Queue: Chengzhong Wu <[email protected]> Cr-Commit-Position: refs/heads/main@{#100894} Refs: v8/v8@e3df60f PR-URL: #58691 Fixes: #56497 Refs: #58138 Reviewed-By: Jason Zhang <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]>
Co-Authored-By: Kenta Moriuchi <[email protected]> PR-URL: #58691 Fixes: #56497 Refs: v8/v8@e3df60f Refs: #58138 Reviewed-By: Jason Zhang <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: James M Snell <[email protected]>
Fixes #56497
Error.isError
, implemented in V8 13.6 (#58070), must returntrue
forDOMException
.