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

Unified Diff: mojo/public/dart/mojo/lib/src/proxy.dart

Issue 1410053002: Dart: Uses a pre-allocated buffer for message pipe query and read. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « mojo/public/dart/mojo/lib/src/message_pipe.dart ('k') | mojo/public/dart/mojo/lib/src/stub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/mojo/lib/src/proxy.dart
diff --git a/mojo/public/dart/mojo/lib/src/proxy.dart b/mojo/public/dart/mojo/lib/src/proxy.dart
index a0191d86d69f2b89e65f38fde828c5b1861b499f..a9ea064dca452ae788122ba27a6e9d3ba120a84a 100644
--- a/mojo/public/dart/mojo/lib/src/proxy.dart
+++ b/mojo/public/dart/mojo/lib/src/proxy.dart
@@ -35,11 +35,11 @@ abstract class Proxy extends core.MojoEventStreamListener {
void handleRead() {
var result = endpoint.queryAndRead();
- if ((result.bytesRead == null) || (result.bytesRead.length == 0)) {
+ if ((result.data == null) || (result.dataLength == 0)) {
throw new MojoCodecError('Unexpected empty message or error: $result');
}
- var message = new ServiceMessage.fromMessage(
- new Message(result.bytesRead, result.handlesRead));
+ var message = new ServiceMessage.fromMessage(new Message(
+ result.data, result.handles, result.dataLength, result.handlesLength));
if (ControlMessageHandler.isControlMessage(message)) {
_handleControlMessageResponse(message);
return;
« no previous file with comments | « mojo/public/dart/mojo/lib/src/message_pipe.dart ('k') | mojo/public/dart/mojo/lib/src/stub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698