This commit is contained in:
David Dehaven 2016-07-28 10:27:46 -07:00
commit e5ce918713
4 changed files with 8 additions and 3 deletions

View File

@ -147,8 +147,6 @@ endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/awt/utility
else
LIBAWT_EXFILES := java2d/ShaderList.c
endif
ifneq ($(filter $(OPENJDK_TARGET_OS), solaris linux macosx aix), )

View File

@ -278,6 +278,12 @@ JNIEXPORT jboolean JNICALL Java_sun_font_SunLayoutEngine_shape
hb_buffer_set_direction(buffer, direction);
chars = (*env)->GetCharArrayElements(env, text, NULL);
if ((*env)->ExceptionCheck(env)) {
hb_buffer_destroy(buffer);
hb_font_destroy(hbfont);
free((void*)jdkFontInfo);
return JNI_FALSE;
}
len = (*env)->GetArrayLength(env, text);
hb_buffer_add_utf16(buffer, chars, len, offset, limit-offset);
@ -309,6 +315,7 @@ JNIEXPORT jboolean JNICALL Java_sun_font_SunLayoutEngine_shape
hb_font_destroy(hbfont);
free((void*)jdkFontInfo);
if (features != NULL) free(features);
(*env)->ReleaseCharArrayElements(env, text, chars, JNI_ABORT);
return JNI_TRUE;
}

View File

@ -49,7 +49,7 @@ ShaderList_AddProgram(ShaderList *programList,
info = (ShaderInfo *)malloc(sizeof(ShaderInfo));
if (info == NULL) {
J2dTraceLn(J2D_TRACE_ERROR,
"OGLContext_AddProgram: could not allocate ShaderInfo");
"D3DContext_AddProgram: could not allocate ShaderInfo");
return;
}