Chromium Code Reviews| Index: mojo/public/cpp/system/handle.h |
| diff --git a/mojo/public/cpp/system/handle.h b/mojo/public/cpp/system/handle.h |
| index 7aa20f521787e161fd6da542a59245322c703a50..d23e5ca7d148def9d987d44586339530204a87db 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 |
|
viettrungluu
2014/08/20 19:52:38
Probably we can just make it take |Handle|s by val
Nick Bray (chromium)
2014/09/03 23:45:03
Done. The only quirk would be if Handle got a des
|
| +// GCC toolchain and results in specialized templates that break strict aliasing |
|
Mark Seaborn
2014/08/26 16:25:54
I don't think we build with -fstrict-aliasing thou
Nick Bray (chromium)
2014/09/03 23:45:03
No bug filed because NaCl GCC is old and awful, an
|
| +// 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(); |
| } |