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

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

Issue 1179733005: Update mojo sdk to rev bdbb0c7e396fc4044a8b194058d7a7e529715286 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update CommandBufferImpl (Binding::OnConnectionError is no more) Created 5 years, 6 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/Encoder.java
diff --git a/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java b/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java
index 4f9535111bca635a196ed79415016445007e08c4..c4e5d787e849aa27375c3cfc0dc6ae67f79e9120 100644
--- a/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java
+++ b/third_party/mojo/src/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Encoder.java
@@ -4,7 +4,7 @@
package org.chromium.mojo.bindings;
-import org.chromium.mojo.bindings.Interface.AbstractProxy.HandlerImpl;
+import org.chromium.mojo.bindings.Interface.Proxy.Handler;
import org.chromium.mojo.system.Core;
import org.chromium.mojo.system.Handle;
import org.chromium.mojo.system.MessagePipeHandle;
@@ -275,15 +275,11 @@ public class Encoder {
"The encoder has been created without a Core. It can't encode an interface.");
}
// If the instance is a proxy, pass the proxy's handle instead of creating a new stub.
- if (v instanceof Interface.AbstractProxy) {
- HandlerImpl handler = ((Interface.AbstractProxy) v).getProxyHandler();
- if (handler.getMessageReceiver() instanceof HandleOwner) {
- encode(((HandleOwner<?>) handler.getMessageReceiver()).passHandle(), offset,
- nullable);
- encode(handler.getVersion(), offset + BindingsHelper.SERIALIZED_HANDLE_SIZE);
- return;
- }
- // If the proxy is not over a message pipe, the default case applies.
+ if (v instanceof Interface.Proxy) {
+ Handler handler = ((Interface.Proxy) v).getProxyHandler();
+ encode(handler.passHandle(), offset, nullable);
+ encode(handler.getVersion(), offset + BindingsHelper.SERIALIZED_HANDLE_SIZE);
+ return;
}
Pair<MessagePipeHandle, MessagePipeHandle> handles =
mEncoderState.core.createMessagePipe(null);

Powered by Google App Engine
This is Rietveld 408576698