mirror of
https://github.com/openjdk/jdk.git
synced 2026-06-09 20:15:10 +00:00
8034113: [parfait] JNI exception pending in jdk/src/macosx/native/sun/font/AWTStrike.m
Reviewed-by: jgodinez, serb
This commit is contained in:
parent
95688c3510
commit
beef7a6745
@ -127,6 +127,9 @@ GetTxFromDoubles(JNIEnv *env, jdoubleArray txArray)
|
||||
}
|
||||
|
||||
jdouble *txPtr = (*env)->GetPrimitiveArrayCritical(env, txArray, NULL);
|
||||
if (txPtr == NULL) {
|
||||
return CGAffineTransformIdentity;
|
||||
}
|
||||
|
||||
CGAffineTransform tx =
|
||||
CGAffineTransformMake(txPtr[0], txPtr[1], txPtr[2],
|
||||
@ -311,18 +314,22 @@ JNF_COCOA_ENTER(env);
|
||||
|
||||
jlong *glyphInfos =
|
||||
(*env)->GetPrimitiveArrayCritical(env, glyphInfoLongArray, NULL);
|
||||
jint *rawGlyphCodes =
|
||||
(*env)->GetPrimitiveArrayCritical(env, glyphCodes, NULL);
|
||||
if (glyphInfos != NULL) {
|
||||
jint *rawGlyphCodes =
|
||||
(*env)->GetPrimitiveArrayCritical(env, glyphCodes, NULL);
|
||||
|
||||
CGGlyphImages_GetGlyphImagePtrs(glyphInfos, awtStrike,
|
||||
rawGlyphCodes, len);
|
||||
if (rawGlyphCodes != NULL) {
|
||||
CGGlyphImages_GetGlyphImagePtrs(glyphInfos, awtStrike,
|
||||
rawGlyphCodes, len);
|
||||
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, glyphCodes,
|
||||
rawGlyphCodes, JNI_ABORT);
|
||||
// Do not use JNI_COMMIT, as that will not free the buffer copy
|
||||
// when +ProtectJavaHeap is on.
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, glyphInfoLongArray,
|
||||
glyphInfos, 0);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, glyphCodes,
|
||||
rawGlyphCodes, JNI_ABORT);
|
||||
}
|
||||
// Do not use JNI_COMMIT, as that will not free the buffer copy
|
||||
// when +ProtectJavaHeap is on.
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, glyphInfoLongArray,
|
||||
glyphInfos, 0);
|
||||
}
|
||||
|
||||
JNF_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user