Backed out changeset f623f6ccca25 (Bug 1286663) for another bustage on android on a CLOSED TREE
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 21 Jul 2016 08:14:27 +0200
changeset 346061 28f30533c6359655335ac5a09e37847ef54dc6ae
parent 346060 138937cd04cb1ee5620cdb2f31e977e28783fe3b
child 346062 4cf2ae920be031332de77f008b97c87cb8c55d2f
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1286663
milestone50.0a1
backs outf623f6ccca2527d453b61e6f61695ee1c746c8e4
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset f623f6ccca25 (Bug 1286663) for another bustage on android on a CLOSED TREE
build/annotationProcessors/utils/Utils.java
widget/android/jni/Refs.h
widget/android/jni/Utils.cpp
--- a/build/annotationProcessors/utils/Utils.java
+++ b/build/annotationProcessors/utils/Utils.java
@@ -7,17 +7,16 @@ package org.mozilla.gecko.annotationProc
 import org.mozilla.gecko.annotationProcessors.AnnotationInfo;
 
 import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Member;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-import java.nio.ByteBuffer;
 import java.util.HashMap;
 
 /**
  * A collection of utility methods used by CodeGenerator. Largely used for translating types.
  */
 public class Utils {
 
     // A collection of lookup tables to simplify the functions to follow...
@@ -92,20 +91,16 @@ public class Utils {
             // to C, generating the corresponding code using this Java program. Really?!
             return "mozilla::jni::Class::Param";
         }
 
         if (type.equals(Throwable.class)) {
             return "mozilla::jni::Throwable::Param";
         }
 
-        if (type.equals(ByteBuffer.class)) {
-            return "mozilla::jni::ByteBuffer::Param";
-        }
-
         return "mozilla::jni::Object::Param";
     }
 
     public static String getNativeReturnType(Class<?> type, AnnotationInfo info) {
         final String name = type.getName().replace('.', '/');
 
         if (NATIVE_TYPES.containsKey(name)) {
             return NATIVE_TYPES.get(name);
@@ -128,20 +123,16 @@ public class Utils {
             // to C, generating the corresponding code using this Java program. Really?!
             return "mozilla::jni::Class::LocalRef";
         }
 
         if (type.equals(Throwable.class)) {
             return "mozilla::jni::Throwable::LocalRef";
         }
 
-        if (type.equals(ByteBuffer.class)) {
-            return "mozilla::jni::ByteBuffer::LocalRef";
-        }
-
         return "mozilla::jni::Object::LocalRef";
     }
 
     /**
      * Get the JNI class descriptor corresponding to the provided type parameter.
      *
      * @param type Class to determine the corresponding JNI descriptor for.
      * @return Class descripor as a String
--- a/widget/android/jni/Refs.h
+++ b/widget/android/jni/Refs.h
@@ -770,48 +770,16 @@ DEFINE_PRIMITIVE_ARRAY_REF(jshortArray, 
 DEFINE_PRIMITIVE_ARRAY_REF(jintArray,     int32_t);
 DEFINE_PRIMITIVE_ARRAY_REF(jlongArray,    int64_t);
 DEFINE_PRIMITIVE_ARRAY_REF(jfloatArray,   float);
 DEFINE_PRIMITIVE_ARRAY_REF(jdoubleArray,  double);
 
 #undef DEFINE_PRIMITIVE_ARRAY_REF
 
 
-class ByteBuffer : public ObjectBase<ByteBuffer, jobject>
-{
-public:
-    explicit ByteBuffer(const Context& ctx)
-        : ObjectBase<ByteBuffer, jobject>(ctx)
-    {}
-
-    static LocalRef New(void* data, size_t capacity)
-    {
-        JNIEnv* const env = GetEnvForThread();
-        const auto ret = LocalRef::Adopt(
-                env, env->NewDirectByteBuffer(data, jlong(capacity)));
-        MOZ_CATCH_JNI_EXCEPTION(env);
-        return ret;
-    }
-
-    void* Address()
-    {
-        void* const ret = Env()->GetDirectBufferAddress(Instance());
-        MOZ_CATCH_JNI_EXCEPTION(Env());
-        return ret;
-    }
-
-    size_t Capacity()
-    {
-        const size_t ret = size_t(Env()->GetDirectBufferCapacity(Instance()));
-        MOZ_CATCH_JNI_EXCEPTION(Env());
-        return ret;
-    }
-};
-
-
 template<>
 class TypedObject<jobjectArray>
     : public ObjectBase<TypedObject<jobjectArray>, jobjectArray>
 {
     using Base = ObjectBase<TypedObject<jobjectArray>, jobjectArray>;
 
 public:
     explicit TypedObject(const Context& ctx) : Base(ctx) {}
--- a/widget/android/jni/Utils.cpp
+++ b/widget/android/jni/Utils.cpp
@@ -55,17 +55,16 @@ template<> const char ObjectBase<TypedOb
 template<> const char ObjectBase<TypedObject<jbyteArray>, jbyteArray>::name[] = "[B";
 template<> const char ObjectBase<TypedObject<jcharArray>, jcharArray>::name[] = "[C";
 template<> const char ObjectBase<TypedObject<jshortArray>, jshortArray>::name[] = "[S";
 template<> const char ObjectBase<TypedObject<jintArray>, jintArray>::name[] = "[I";
 template<> const char ObjectBase<TypedObject<jlongArray>, jlongArray>::name[] = "[J";
 template<> const char ObjectBase<TypedObject<jfloatArray>, jfloatArray>::name[] = "[F";
 template<> const char ObjectBase<TypedObject<jdoubleArray>, jdoubleArray>::name[] = "[D";
 template<> const char ObjectBase<TypedObject<jobjectArray>, jobjectArray>::name[] = "[Ljava/lang/Object;";
-template<> const char ObjectBase<ByteBuffer, jobject>::name[] = "java/nio/ByteBuffer";
 
 
 JNIEnv* sGeckoThreadEnv;
 
 namespace {
 
 JavaVM* sJavaVM;
 pthread_key_t sThreadEnvKey;