Merge "Fix a compare of JNI references to use IsSameObject."

This commit is contained in:
Carl Shapiro
2011-03-03 17:17:43 -08:00
committed by Android (Google) Code Review

View File

@@ -378,7 +378,7 @@ static void Surface_unlockCanvasAndPost(
JNIEnv* env, jobject clazz, jobject argCanvas)
{
jobject canvas = env->GetObjectField(clazz, so.canvas);
if (canvas != argCanvas) {
if (env->IsSameObject(canvas, argCanvas) == JNI_FALSE) {
doThrow(env, "java/lang/IllegalArgumentException", NULL);
return;
}