<AWT Dev> [8] Review request for 8025775: JNI warnings in TryXShmAttach

Anton Litvinov anton.litvinov at oracle.com
Fri Nov 29 14:13:15 PST 2013


Could you please review the following fix for the bug, which consists in 
invocation of Java methods from native code via JNI ("TryXShmAttach" 
function in "awt_GraphicsEnv.c" file) after "GetPrimitiveArrayCritical" 
is called ("BufImg_GetRasInfo" function in "BufImgSurfaceData.c" file).

Bug: http://bugs.sun.com/view_bug.do?bug_id=8025775
Webrev: http://cr.openjdk.java.net/~alitvinov/8025775/jdk8/webrev.00

The solution is based on:
- Reversion of all XError handling code implemented as "native -> Java" 
calls in the fix for CR 8005607 to its prior state with native error 
- Introduction of a native synthetic error handler 
"awt_util.c::current_native_xerror_handler" set/unset through previously 
known macros in "awt_util.h" file and called from 
"XlibWrapper.c::ToolkitErrorHandler" function before a call to Java 
synthetic error handler.

The fix also changed both returned native error handlers: 
"GLXSurfaceData.c::GLXSD_BadAllocXErrHandler" not to call previous error 
handler and to always return "0" value as a result.

Thank you,

More information about the awt-dev mailing list