Bug 733896 - Together with 580381e2805c, this completely backs out b520f34d78f1 and 4f5bd60be09e. r=ehsan

This commit is contained in:
Kartikaya Gupta
2012-03-12 14:42:37 -04:00
parent eb1643506a
commit 89fb8ab1c5
4 changed files with 0 additions and 46 deletions

View File

@@ -76,7 +76,6 @@ jfieldID AndroidGeckoEvent::jLocationField = 0;
jfieldID AndroidGeckoEvent::jAddressField = 0;
jfieldID AndroidGeckoEvent::jBandwidthField = 0;
jfieldID AndroidGeckoEvent::jCanBeMeteredField = 0;
jmethodID AndroidGeckoEvent::jDoCallbackMethod = 0;
jclass AndroidPoint::jPointClass = 0;
jfieldID AndroidPoint::jXField = 0;
@@ -208,8 +207,6 @@ AndroidGeckoEvent::InitGeckoEventClass(JNIEnv *jEnv)
jAddressField = getField("mAddress", "Landroid/location/Address;");
jBandwidthField = getField("mBandwidth", "D");
jCanBeMeteredField = getField("mCanBeMetered", "Z");
jDoCallbackMethod = getMethod("doCallback", "(Ljava/lang/String;)V");
}
void
@@ -488,16 +485,6 @@ AndroidGeckoEvent::Init(int aType, nsIntRect const& aRect)
mRect = aRect;
}
AndroidGeckoEvent::~AndroidGeckoEvent() {
if (!wrapped_obj)
return;
JNIEnv *jenv = GetJNIForThread();
if (!jenv)
return;
jenv->DeleteGlobalRef(wrapped_obj);
}
void
AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
{
@@ -508,8 +495,6 @@ AndroidGeckoEvent::Init(JNIEnv *jenv, jobject jobj)
if (!jobj)
return;
jenv->NewGlobalRef(jobj);
mAction = jenv->GetIntField(jobj, jActionField);
mType = jenv->GetIntField(jobj, jTypeField);
@@ -670,15 +655,6 @@ AndroidPoint::Init(JNIEnv *jenv, jobject jobj)
}
}
void
AndroidGeckoEvent::DoCallback(const nsAString& data) {
JNIEnv* env = AndroidBridge::GetJNIEnv();
if (!env)
return;
jstring jData = env->NewString(nsPromiseFlatString(data).get(), data.Length());
env->CallVoidMethod(wrapped_obj, jDoCallbackMethod, jData);
}
void
AndroidGeckoLayerClient::Init(jobject jobj)
{