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

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

Issue 975973002: Update mojo sdk to rev f68e697e389943cd9bf9652397312280e96b127a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shake fist at msvc 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/stub.dart
diff --git a/third_party/mojo/src/mojo/public/dart/src/stub.dart b/third_party/mojo/src/mojo/public/dart/src/stub.dart
index 823873627ec267adaa25db536f4e036bca2990dd..1ce098239cec317e1093c564d98eb7a319e1f890 100644
--- a/third_party/mojo/src/mojo/public/dart/src/stub.dart
+++ b/third_party/mojo/src/mojo/public/dart/src/stub.dart
@@ -40,9 +40,10 @@ abstract class Stub extends core.MojoEventStreamListener {
responseFuture.then((response) {
_outstandingResponseFutures--;
if (isOpen) {
- endpoint.write(response.buffer,
- response.buffer.lengthInBytes,
- response.handles);
+ endpoint.write(
+ response.buffer,
+ response.buffer.lengthInBytes,
+ response.handles);
if (!endpoint.status.isOk) {
throw 'message pipe write failed: ${endpoint.status}';
}
@@ -69,9 +70,10 @@ abstract class Stub extends core.MojoEventStreamListener {
// NB: |nodefer| should only be true when calling close() while handling an
// exception thrown from handleRead(), e.g. when we receive a malformed
// message.
- void close({bool nodefer : false}) {
- if (!isOpen) return;
- if (!nodefer && (isInHandler || (_outstandingResponseFutures > 0))) {
+ void close({bool nodefer: false}) {
+ if (isOpen &&
+ !nodefer &&
+ (isInHandler || (_outstandingResponseFutures > 0))) {
// Either close() is being called from within handleRead() or
// handleWrite(), or close() is being called while there are outstanding
// response futures. Defer the actual close until all response futures
« no previous file with comments | « third_party/mojo/src/mojo/public/dart/src/proxy.dart ('k') | third_party/mojo/src/mojo/public/go/bindings/async_waiter.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698