diff options
author | Luis Hector Chavez <lhchavez@google.com> | 2018-07-13 21:22:39 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-07-13 21:22:39 -0700 |
commit | ce62460cb0d303dda64424f5a91538d0386d02fc (patch) | |
tree | ade991d99af3d32156d8b820dc552cb7101a8855 | |
parent | 02af757579893fb53672214b96fcc72c2c50962e (diff) | |
parent | 1ec13ff8a419faa4bfa859400c6eee6d50ce2a7e (diff) | |
download | libchrome-ce62460cb0d303dda64424f5a91538d0386d02fc.tar.gz |
Revert hacks to avoid runtime crashes
am: 1ec13ff8a4
Change-Id: I15a898683e19b5a35939a2111394081c75c3bd00
3 files changed, 3 insertions, 66 deletions
diff --git a/libchrome_tools/patch/mojo.patch b/libchrome_tools/patch/mojo.patch index 723fe37696..d86b735380 100644 --- a/libchrome_tools/patch/mojo.patch +++ b/libchrome_tools/patch/mojo.patch @@ -141,23 +141,6 @@ // Workaround for https://crbug.com/665869. base::subtle::MemoryBarrier(); #endif ---- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java -+++ b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java -@@ -206,7 +206,13 @@ public interface Interface extends Conne - == RunOutput.Tag.QueryVersionResult) { - mVersion = response.output.getQueryVersionResult().version; - } -- callback.call(mVersion); -+ try { -+ callback.call(mVersion); -+ } catch (RuntimeException e) { -+ // TODO(lhchavez): Remove this hack. See b/28986534 for details. -+ android.util.Log.wtf("org.chromium.mojo.bindings.Interface", -+ "Uncaught runtime exception", e); -+ } - } - }); - } --- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/RouterImpl.java +++ b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/RouterImpl.java @@ -171,20 +171,23 @@ public class RouterImpl implements Route @@ -217,36 +200,6 @@ return responder.accept(message); } else { if (mIncomingMessageReceiver != null) { ---- a/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl -+++ b/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl -@@ -113,7 +113,12 @@ try { - {% else %} - {{request_struct|name}}.deserialize(messageWithHeader.getPayload()); - {% endif %} -- getImpl().{{method|name}}({{run_callback('data', method.parameters)}}{% if with_response %}{% if method.parameters %}, {% endif %}new {{response_struct|name}}ProxyToResponder(getCore(), receiver, header.getRequestId()){% endif %}); -+ try { -+ getImpl().{{method|name}}({{run_callback('data', method.parameters)}}{% if with_response %}{% if method.parameters %}, {% endif %}new {{response_struct|name}}ProxyToResponder(getCore(), receiver, header.getRequestId()){% endif %}); -+ } catch (RuntimeException e) { -+ // TODO(lhchavez): Remove this hack. See b/28814913 for details. -+ android.util.Log.wtf("{{namespace}}.{{interface.name}}", "Uncaught runtime exception", e); -+ } - return true; - } - {% endif %} -@@ -241,7 +246,12 @@ class {{interface|name}}_Internal { - {% if method.response_parameters|length %} - {{response_struct|name}} response = {{response_struct|name}}.deserialize(messageWithHeader.getPayload()); - {% endif %} -- mCallback.call({{run_callback('response', method.response_parameters)}}); -+ try { -+ mCallback.call({{run_callback('response', method.response_parameters)}}); -+ } catch (RuntimeException e) { -+ // TODO(lhchavez): Remove this hack. See b/28814913 for details. -+ android.util.Log.wtf("{{namespace}}.{{interface.name}}", "Uncaught runtime exception", e); -+ } - return true; - } catch (org.chromium.mojo.bindings.DeserializationException e) { - return false; --- a/base/android/jni_android.cc +++ b/base/android/jni_android.cc @@ -10,7 +10,8 @@ diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java index 2699ab899a..e3be8b3daa 100644 --- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java +++ b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java @@ -206,13 +206,7 @@ public interface Interface extends ConnectionErrorHandler, Closeable { == RunOutput.Tag.QueryVersionResult) { mVersion = response.output.getQueryVersionResult().version; } - try { - callback.call(mVersion); - } catch (RuntimeException e) { - // TODO(lhchavez): Remove this hack. See b/28986534 for details. - android.util.Log.wtf("org.chromium.mojo.bindings.Interface", - "Uncaught runtime exception", e); - } + callback.call(mVersion); } }); } diff --git a/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl index a723f8c393..c7dcbbc7cb 100644 --- a/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl +++ b/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl @@ -113,12 +113,7 @@ try { {% else %} {{request_struct|name}}.deserialize(messageWithHeader.getPayload()); {% endif %} - try { - getImpl().{{method|name}}({{run_callback('data', method.parameters)}}{% if with_response %}{% if method.parameters %}, {% endif %}new {{response_struct|name}}ProxyToResponder(getCore(), receiver, header.getRequestId()){% endif %}); - } catch (RuntimeException e) { - // TODO(lhchavez): Remove this hack. See b/28814913 for details. - android.util.Log.wtf("{{namespace}}.{{interface.name}}", "Uncaught runtime exception", e); - } + getImpl().{{method|name}}({{run_callback('data', method.parameters)}}{% if with_response %}{% if method.parameters %}, {% endif %}new {{response_struct|name}}ProxyToResponder(getCore(), receiver, header.getRequestId()){% endif %}); return true; } {% endif %} @@ -246,12 +241,7 @@ class {{interface|name}}_Internal { {% if method.response_parameters|length %} {{response_struct|name}} response = {{response_struct|name}}.deserialize(messageWithHeader.getPayload()); {% endif %} - try { - mCallback.call({{run_callback('response', method.response_parameters)}}); - } catch (RuntimeException e) { - // TODO(lhchavez): Remove this hack. See b/28814913 for details. - android.util.Log.wtf("{{namespace}}.{{interface.name}}", "Uncaught runtime exception", e); - } + mCallback.call({{run_callback('response', method.response_parameters)}}); return true; } catch (org.chromium.mojo.bindings.DeserializationException e) { return false; |