DescriptionAllocate typed arrays uninitialized when constructing from array-like.
This is a fix for performance regression. For new Uint8Array(arrayLike)
and the likes, we allocate the backing store of typed array
uninitialized and then proceed to feel it in with elements of arrayLike.
If the loop over arrayLike runs to completion, we know that all elements
of typed arrays had been assigned to and there is no uninitialized
memory. If the loop does not run to completion, we propagate the
exception to constructor caller, therefore the typed array is not
exposed to user program.
BUG=270507
R=yangguo@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=16914
Patch Set 1 #Patch Set 2 : #
Total comments: 2
Patch Set 3 : Patch for landing #Messages
Total messages: 4 (0 generated)
|