-
Notifications
You must be signed in to change notification settings - Fork 318
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
Ensure that crypto allocations are using BufferSource #3127
Conversation
A handful of the remaining uses of |
107ae02
to
825d12d
Compare
825d12d
to
fd2ebad
Compare
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.
This is great, should help with the sandboxing of V8.
@@ -207,19 +207,28 @@ class CryptoKey: public jsg::Object { | |||
KJ_SWITCH_ONEOF(publicExponent) { | |||
KJ_CASE_ONEOF(array, BigInteger) { | |||
if (fixPublicExp) { | |||
auto expCopy = kj::heapArray<kj::byte>(array.asPtr()); | |||
jsg::BackingStore expBack = jsg::BackingStore::from(kj::mv(expCopy)); | |||
// alloc will, by default create a Uint8Array |
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.
If the comment is intended to document what type is hiding behind auto
then would it not be nicer to just write the type there.
If that's not what is intended, then the reason for the comment is unclear.
... ensures that all ArrayBuffer instances are using sandboxed allocations rather than external allocations.
fd2ebad
to
8ce6016
Compare
... ensures that all ArrayBuffer instances are using BufferSource rather than external allocations.