-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
util: inspect: avoid a crash on a DataView with a detached buffer #56669
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
76816c0 to
6c20156
Compare
6c20156 to
3b2895d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #56669 +/- ##
==========================================
- Coverage 89.21% 89.21% -0.01%
==========================================
Files 662 662
Lines 191893 191914 +21
Branches 36936 36941 +5
==========================================
+ Hits 171189 171207 +18
- Misses 13541 13549 +8
+ Partials 7163 7158 -5
🚀 New features to boost your workflow:
|
anonrig
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
BridgeAR
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.
The current approach would impact the common case, while it's possible to separate that to only being treated special in case a DataView is handled.
@ljharb please have a look at the detached ArrayBuffer implementation handling. That works without impacting the common case :)
|
Ping @ljharb |
|
thanks, still on my list :-) will try to get to it soon |
This makes sure special properties (such as a byteLength, buffer, and more) are marked that they are not regular properties. They are mostly getters, that just seemed even more of a breaking change. Thus, they just use square brackets for now. On top of that, it makes inspecting detached DataViews robust. Inspecting those failed so far. Closes: nodejs#56669
This makes sure special properties (such as a byteLength, buffer, and more) are marked that they are not regular properties. They are mostly getters, that just seemed even more of a breaking change. Thus, they just use square brackets for now. On top of that, it makes inspecting detached DataViews robust. Inspecting those failed so far. Closes: nodejs#56669
No description provided.