Chromium Code Reviews
DescriptionAdd typed data view creation functions on ByteBuffer.
This provides a better model and better separation for typed data.
Currently the only thing you can do with a ByteBuffer is pass
it as argument to a typed data .view factory method, which then
uses internal-only functionality to create the view.
With this change, the functionality of creating the view,
and understanding the internals of the ByteBuffer, is put on the
ByteBuffer class itself.
The view constructors on the typed data classes are retained, but
they just forward to the buffer's method. This provides backwards
compatibility and familiarity.
This change allows mocking the ByteData object. There is no hidden
connection between the constructor and the buffer that other objects
can't implement.
The change is non-breaking - it only adds methods to ByteBuffer, and
there have been absolutely no reason to extend ByteBuffer until now,
because it won't work anyway.
R=asiva@google.com, sgjesse@google.com
Committed: https://code.google.com/p/dart/source/detail?r=37974
Patch Set 1 #
Total comments: 1
Patch Set 2 : Address comments. #
Messages
Total messages: 6 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||