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

Unified Diff: mojo/public/cpp/system/handle.h

Issue 385983008: Mojo + NaCl prototype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Edits Created 6 years, 5 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
« mojo/monacl.gypi ('K') | « mojo/public/c/system/tests/core_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/handle.h
diff --git a/mojo/public/cpp/system/handle.h b/mojo/public/cpp/system/handle.h
index af81824603f6d00a7542b2173206105d551b93ee..b33d8068a652779f36b9aa7bf3c2b22716e2ca13 100644
--- a/mojo/public/cpp/system/handle.h
+++ b/mojo/public/cpp/system/handle.h
@@ -238,7 +238,15 @@ inline MojoResult CloseRaw(Handle handle) {
// Strict weak ordering, so that |Handle|s can be used as keys in |std::map|s,
// etc.
+#ifdef __native_client__
+// Passing the operands by reference confuses the STL implementation in NaCl's
+// GCC toolchain and results in specialized templates that break strict aliasing
+// rules.
+// TODO(ncbray): unhack this.
+inline bool operator<(const Handle a, const Handle b) {
+#else
inline bool operator<(const Handle& a, const Handle& b) {
+#endif
return a.value() < b.value();
}
« mojo/monacl.gypi ('K') | « mojo/public/c/system/tests/core_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698