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

Unified Diff: mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes Created 6 years, 1 month 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
Index: mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java
diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java
index ef04f6dd413c56466f1e293d4a081035a74d3c04..75cddc97a463bdb639b06d6fafbf07adf8f9487d 100644
--- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java
+++ b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java
@@ -59,7 +59,7 @@ public class Encoder {
this.core = core;
byteBuffer = ByteBuffer.allocateDirect(
bufferSize > 0 ? bufferSize : INITIAL_BUFFER_SIZE);
- byteBuffer.order(ByteOrder.nativeOrder());
+ byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
dataEnd = 0;
}
@@ -226,8 +226,8 @@ public class Encoder {
encodeNullPointer(offset, nullable);
return;
}
- final int arrayNullability = nullable ?
- BindingsHelper.ARRAY_NULLABLE : BindingsHelper.NOTHING_NULLABLE;
+ final int arrayNullability = nullable
+ ? BindingsHelper.ARRAY_NULLABLE : BindingsHelper.NOTHING_NULLABLE;
encode(v.getBytes(Charset.forName("utf8")), offset, arrayNullability,
BindingsHelper.UNSPECIFIED_ARRAY_LENGTH);
}
@@ -303,8 +303,8 @@ public class Encoder {
encodeNullPointer(offset, BindingsHelper.isArrayNullable(arrayNullability));
return;
}
- if (expectedLength != BindingsHelper.UNSPECIFIED_ARRAY_LENGTH &&
- expectedLength != v.length) {
+ if (expectedLength != BindingsHelper.UNSPECIFIED_ARRAY_LENGTH
+ && expectedLength != v.length) {
throw new SerializationException("Trying to encode a fixed array of incorrect length.");
}
byte[] bytes = new byte[(v.length + 7) / BindingsHelper.ALIGNMENT];
@@ -327,8 +327,8 @@ public class Encoder {
encodeNullPointer(offset, BindingsHelper.isArrayNullable(arrayNullability));
return;
}
- if (expectedLength != BindingsHelper.UNSPECIFIED_ARRAY_LENGTH &&
- expectedLength != v.length) {
+ if (expectedLength != BindingsHelper.UNSPECIFIED_ARRAY_LENGTH
+ && expectedLength != v.length) {
throw new SerializationException("Trying to encode a fixed array of incorrect length.");
}
encodeByteArray(v, v.length, offset);
@@ -473,8 +473,8 @@ public class Encoder {
private Encoder encoderForArray(
int elementSizeInByte, int length, int offset, int expectedLength) {
- if (expectedLength != BindingsHelper.UNSPECIFIED_ARRAY_LENGTH &&
- expectedLength != length) {
+ if (expectedLength != BindingsHelper.UNSPECIFIED_ARRAY_LENGTH
+ && expectedLength != length) {
throw new SerializationException("Trying to encode a fixed array of incorrect length.");
}
return encoderForArrayByTotalSize(length * elementSizeInByte, length, offset);

Powered by Google App Engine
This is Rietveld 408576698