From da72780b4510f184ee93bb46e5daeab9b8a922dd Mon Sep 17 00:00:00 2001 From: Dylan Roeh Date: Fri, 10 Jul 2015 10:11:20 -0500 Subject: [PATCH] Bug 1172567 - Use GetLongField rather than GetIntField for jEGLSurfacePointerField when the API version is >= 20. r=snorp --- widget/android/AndroidBridge.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index 002d51c09dbc..b141b16b75d2 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -740,7 +740,8 @@ AndroidBridge::CreateEGLSurfaceForCompositor() } JNIEnv* const env = GetJNIForThread(); // called on the compositor thread - return reinterpret_cast( + return reinterpret_cast(mAPIVersion >= 20 ? + env->GetLongField(eglSurface.Get(), jEGLSurfacePointerField) : env->GetIntField(eglSurface.Get(), jEGLSurfacePointerField)); }