RFR: 8065991: LogManager unecessarily calls JavaAWTAccess from within a critical section
mandy.chung at oracle.com
Tue Dec 2 19:24:17 UTC 2014
On 11/26/14 9:11 AM, Daniel Fuchs wrote:
> Please find below a patch for:
> 8065991: LogManager unecessarily calls JavaAWTAccess from within
> a critical section
line 465 can be moved together with line 461.
For the logger created by EventQueue in non-applet env, do we
expect JavaAWTAccess.getAppletContext to return null (as it
should only find the main AppContext)?
As the deadlock reported from JDK-8065709, it hits the race when
main AppContext object has been created and the numAppContexts counter
has been incremented but mainAppContext is not set in which case
even with this patch, it will still call AppContext.getAppContext()
and hit that deadlockon sun.awt.AppContext$GetAppContextLock.
Should JavaAWTAccess.getAppletContext simply return null (not calling
getAppContext) if it determines the main AppContext is being initialized?
More information about the core-libs-dev