This repository was archived by the owner on Oct 24, 2023. It is now read-only.
Repository navigation
Allow implementations to round up max byte lengths - #25
Merged
Merged
Conversation
|
lgtm, but looks like I'm not allowed to mark this as reviewed |
marjakh
approved these changes
Feb 23, 2021
| 1. <ins>Append [[ArrayBufferByteLengthData]] and [[ArrayBufferMaxByteLength]] to _slots_.</ins> | ||
| 1. <ins>Let _maxByteLength_ be an implementation-defined value that is ≥ _requestedMaxByteLength_ and a power of 2.</ins> | ||
| 1. <ins>NOTE: Implementations may choose to round up the requested maximum byte length, for example, to be on a page boundary.</ins> | ||
| 1. <ins>Else, append [[ArrayBufferByteLength]] to _slots_.</ins> |
There was a problem hiding this comment.
(just experimenting with GitHub UI, maybe I need to click the "start a review" button so that the code review UI would appear?)
codehag
reviewed
Mar 5, 2021
| 1. <ins>If _requestedMaxByteLength_ is present, then:</ins> | ||
| 1. <ins>Append [[ArrayBufferByteLengthData]] and [[ArrayBufferMaxByteLength]] to _slots_.</ins> | ||
| 1. <ins>Let _maxByteLength_ be an implementation-defined value that is ≥ _requestedMaxByteLength_ and a power of 2.</ins> | ||
| 1. <ins>NOTE: Implementations may choose to round up the requested maximum byte length, for example, to be on a page boundary.</ins> |
There was a problem hiding this comment.
Want to highlight this -- could we limit this to a set of granularities rather than giving implementation a blank check here? I think this might have been discussed already but I can't seem to find it now.
syg
added a commit
that referenced
this pull request
Apr 8, 2021
syg
added a commit
that referenced
this pull request
Apr 19, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unlike allowing implementations to round byte lengths, the only harm I see in allowing implementations to round max byte length I see is giving more bits to fingerprinting.
I'm leaning towards making this tradeoff and allowing implementations to round.
To recover some bits of fingerprinting and possible interop concerns, this PR requires that any rounding up, if performed, must result in a power of 2.
Closes #18, #23