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

Unified Diff: mojo/edk/js/core.cc

Issue 1880823005: [mojo-edk] Add explicit message object APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/edk/embedder/entrypoints.cc ('k') | mojo/edk/js/tests/connection_tests.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/js/core.cc
diff --git a/mojo/edk/js/core.cc b/mojo/edk/js/core.cc
index f1fc9167e899253d2211c5bc5088e95525446232..c8ccc37c536db220ef621fa5dc51299515236f24 100644
--- a/mojo/edk/js/core.cc
+++ b/mojo/edk/js/core.cc
@@ -145,12 +145,10 @@ MojoResult WriteMessage(
raw_handles.empty() ? NULL : &raw_handles[0],
static_cast<uint32_t>(raw_handles.size()),
flags);
- // MojoWriteMessage takes ownership of the handles upon success, so
- // release them here.
- if (rv == MOJO_RESULT_OK) {
- for (size_t i = 0; i < handles.size(); ++i)
- ignore_result(handles[i]->release());
- }
+ // MojoWriteMessage takes ownership of the handles, so release them here.
+ for (size_t i = 0; i < handles.size(); ++i)
+ ignore_result(handles[i]->release());
+
return rv;
}
« no previous file with comments | « mojo/edk/embedder/entrypoints.cc ('k') | mojo/edk/js/tests/connection_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698