Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: third_party/mojo/src/mojo/public/dart/src/drain_data.dart

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use run_renderer_in_process() Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/public/dart/src/drain_data.dart
diff --git a/third_party/mojo/src/mojo/public/dart/src/drain_data.dart b/third_party/mojo/src/mojo/public/dart/src/drain_data.dart
index ffc56e5629434d3f5dc47817f7426422a30cf290..b5929e567a3191f1582a32bcc011bb28a9a43549 100644
--- a/third_party/mojo/src/mojo/public/dart/src/drain_data.dart
+++ b/third_party/mojo/src/mojo/public/dart/src/drain_data.dart
@@ -16,12 +16,16 @@ class DataPipeDrainer {
_dataSize = 0;
}
+ ByteData _copy(ByteData byteData) =>
+ new ByteData.view(
+ new Uint8List.fromList(byteData.buffer.asUint8List()).buffer);
+
MojoResult _doRead() {
ByteData thisRead = _consumer.beginRead();
if (thisRead == null) {
throw 'Data pipe beginRead failed: ${_consumer.status}';
}
- _dataList.add(thisRead);
+ _dataList.add(_copy(thisRead));
_dataSize += thisRead.lengthInBytes;
return _consumer.endRead(thisRead.lengthInBytes);
}
« no previous file with comments | « third_party/mojo/src/mojo/public/dart/src/codec.dart ('k') | third_party/mojo/src/mojo/public/dart/src/message.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698