OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 part of bindings; | 5 part of bindings; |
6 | 6 |
7 int align(int size) => size + (kAlignment - (size % kAlignment)) % kAlignment; | 7 int align(int size) => size + (kAlignment - (size % kAlignment)) % kAlignment; |
8 | 8 |
9 const int kAlignment = 8; | 9 const int kAlignment = 8; |
10 const int kSerializedHandleSize = 4; | 10 const int kSerializedHandleSize = 4; |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 throw new MojoCodecError( | 899 throw new MojoCodecError( |
900 'Incorrect header for map. The size is incorrect.'); | 900 'Incorrect header for map. The size is incorrect.'); |
901 } | 901 } |
902 if (header.version != kMapStructHeader.version) { | 902 if (header.version != kMapStructHeader.version) { |
903 throw new MojoCodecError( | 903 throw new MojoCodecError( |
904 'Incorrect header for map. The version is incorrect.'); | 904 'Incorrect header for map. The version is incorrect.'); |
905 } | 905 } |
906 return header; | 906 return header; |
907 } | 907 } |
908 } | 908 } |
OLD | NEW |