| Index: mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
|
| diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
|
| index efb984264e7f9b5e910cb11f5a457187f0fe6f56..80ed9d1f20e76b1ea562796bfe97503f33390a6c 100644
|
| --- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
|
| +++ b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
|
| @@ -145,6 +145,21 @@ public class Decoder {
|
| }
|
|
|
| /**
|
| + * Deserializes a {@link DataHeader} at the given offset and checks if it is correct for a map.
|
| + */
|
| + public void readDataHeaderForMap() {
|
| + DataHeader si = readDataHeader();
|
| + if (si.size != BindingsHelper.MAP_STRUCT_HEADER.size) {
|
| + throw new DeserializationException(
|
| + "Incorrect header for map. The size is incorrect.");
|
| + }
|
| + if (si.numFields != BindingsHelper.MAP_STRUCT_HEADER.numFields) {
|
| + throw new DeserializationException(
|
| + "Incorrect header for map. The number of fields is incorrect.");
|
| + }
|
| + }
|
| +
|
| + /**
|
| * Deserializes a byte at the given offset.
|
| */
|
| public byte readByte(int offset) {
|
|
|