<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


Hello,

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 
handlers.
- 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: 
"awt_GraphicsEnv.c::XShmAttachXErrHandler", 
"GLXSurfaceData.c::GLXSD_BadAllocXErrHandler" not to call previous error 
handler and to always return "0" value as a result.

Thank you,
Anton


More information about the awt-dev mailing list