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

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

Issue 1127293003: Update mojo sdk to rev f84766d3b6420b7cf6a113d9d65d73cb5fe18d90 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 5 years, 7 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
Index: third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
diff --git a/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java b/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
index b73ec043936570bfa892b30ebee2186e50b6d04f..81cbc9871e756207cc046272f375ce74183c2d7d 100644
--- a/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
+++ b/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Decoder.java
@@ -432,12 +432,12 @@ public class Decoder {
*/
public <P extends Proxy> P readServiceInterface(int offset, boolean nullable,
Interface.Manager<?, P> manager) {
- // Ignore the version field for now. Only read the handle field.
MessagePipeHandle handle = readMessagePipeHandle(offset, nullable);
if (!handle.isValid()) {
return null;
}
- return manager.attachProxy(handle);
+ int version = readInt(offset + BindingsHelper.SERIALIZED_HANDLE_SIZE);
+ return manager.attachProxy(handle, version);
}
/**
@@ -589,8 +589,8 @@ public class Decoder {
if (d == null) {
return null;
}
- DataHeader si = d.readDataHeaderForArray(BindingsHelper.SERIALIZED_INTERFACE_SIZE,
- expectedLength);
+ DataHeader si =
+ d.readDataHeaderForArray(BindingsHelper.SERIALIZED_INTERFACE_SIZE, expectedLength);
S[] result = manager.buildArray(si.elementsOrVersion);
for (int i = 0; i < result.length; ++i) {
// This cast is necessary because java 6 doesn't handle wildcard correctly when using

Powered by Google App Engine
This is Rietveld 408576698