Bug 1014614 - Fix JNI wrapper for registering SurfaceTexture listener callbacks r=blassey

--HG--
extra : rebase_source : 7ca9e81660049ea607895a89b8a83dbac8b9d81c
This commit is contained in:
James Willcox 2014-10-17 10:35:11 -05:00
parent 11206bf2d1
commit b01894b69c
2 changed files with 2 additions and 2 deletions

View File

@ -2547,7 +2547,7 @@ public class GeckoAppShell
getGeckoInterface().notifyWakeLockChanged(topic, state);
}
@WrapElementForJNI
@WrapElementForJNI(allowMultithread = true)
public static void registerSurfaceTextureFrameListener(Object surfaceTexture, final int id) {
((SurfaceTexture)surfaceTexture).setOnFrameAvailableListener(new SurfaceTexture.OnFrameAvailableListener() {
@Override

View File

@ -1088,7 +1088,7 @@ bool GeckoAppShell::PumpMessageLoop() {
}
void GeckoAppShell::RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1) {
JNIEnv *env = AndroidBridge::GetJNIEnv();
JNIEnv *env = GetJNIForThread();
if (env->PushLocalFrame(1) != 0) {
AndroidBridge::HandleUncaughtException(env);
MOZ_CRASH("Exception should have caused crash.");