Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
64cda408
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
64cda408
编写于
5月 19, 2014
作者:
P
pchelko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8042590: Running form URL throws NPE
Reviewed-by: anthony, serb
上级
e6fad1b8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
11 deletion
+33
-11
src/windows/classes/sun/awt/windows/ThemeReader.java
src/windows/classes/sun/awt/windows/ThemeReader.java
+22
-10
src/windows/classes/sun/awt/windows/WToolkit.java
src/windows/classes/sun/awt/windows/WToolkit.java
+10
-1
src/windows/classes/sun/awt/windows/WWindowPeer.java
src/windows/classes/sun/awt/windows/WWindowPeer.java
+1
-0
未找到文件。
src/windows/classes/sun/awt/windows/ThemeReader.java
浏览文件 @
64cda408
...
@@ -56,18 +56,12 @@ public class ThemeReader {
...
@@ -56,18 +56,12 @@ public class ThemeReader {
new
ReentrantReadWriteLock
();
new
ReentrantReadWriteLock
();
private
static
final
Lock
readLock
=
readWriteLock
.
readLock
();
private
static
final
Lock
readLock
=
readWriteLock
.
readLock
();
private
static
final
Lock
writeLock
=
readWriteLock
.
writeLock
();
private
static
final
Lock
writeLock
=
readWriteLock
.
writeLock
();
private
static
volatile
boolean
valid
=
false
;
static
void
flush
()
{
static
void
flush
()
{
writeLock
.
lock
();
// Could be called on Toolkit thread, so do not try to aquire locks
try
{
// to avoid deadlock with theme initialization
// Close old themes.
valid
=
false
;
for
(
Long
value
:
widgetToTheme
.
values
())
{
closeTheme
(
value
.
longValue
());
}
widgetToTheme
.
clear
();
}
finally
{
writeLock
.
unlock
();
}
}
}
public
native
static
boolean
isThemed
();
public
native
static
boolean
isThemed
();
...
@@ -94,6 +88,24 @@ public class ThemeReader {
...
@@ -94,6 +88,24 @@ public class ThemeReader {
// returns theme value
// returns theme value
// this method should be invoked with readLock locked
// this method should be invoked with readLock locked
private
static
Long
getTheme
(
String
widget
)
{
private
static
Long
getTheme
(
String
widget
)
{
if
(!
valid
)
{
readLock
.
unlock
();
writeLock
.
lock
();
try
{
if
(!
valid
)
{
// Close old themes.
for
(
Long
value
:
widgetToTheme
.
values
())
{
closeTheme
(
value
);
}
widgetToTheme
.
clear
();
valid
=
true
;
}
}
finally
{
readLock
.
lock
();
writeLock
.
unlock
();
}
}
// mostly copied from the javadoc for ReentrantReadWriteLock
// mostly copied from the javadoc for ReentrantReadWriteLock
Long
theme
=
widgetToTheme
.
get
(
widget
);
Long
theme
=
widgetToTheme
.
get
(
widget
);
if
(
theme
==
null
)
{
if
(
theme
==
null
)
{
...
...
src/windows/classes/sun/awt/windows/WToolkit.java
浏览文件 @
64cda408
...
@@ -867,7 +867,16 @@ public class WToolkit extends SunToolkit implements Runnable {
...
@@ -867,7 +867,16 @@ public class WToolkit extends SunToolkit implements Runnable {
* Windows doesn't always send WM_SETTINGCHANGE when it should.
* Windows doesn't always send WM_SETTINGCHANGE when it should.
*/
*/
private
void
windowsSettingChange
()
{
private
void
windowsSettingChange
()
{
EventQueue
.
invokeLater
(
this
::
updateProperties
);
if
(
AppContext
.
getAppContext
()
==
null
)
{
// We cannot post the update to any EventQueue. Listeners will
// be called on EDTs by DesktopPropertyChangeSupport
updateProperties
();
}
else
{
// Cannot update on Toolkit thread.
// DesktopPropertyChangeSupport will call listeners on Toolkit
// thread if it has AppContext (standalone mode)
EventQueue
.
invokeLater
(
this
::
updateProperties
);
}
}
}
private
synchronized
void
updateProperties
()
{
private
synchronized
void
updateProperties
()
{
...
...
src/windows/classes/sun/awt/windows/WWindowPeer.java
浏览文件 @
64cda408
...
@@ -436,6 +436,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
...
@@ -436,6 +436,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
static
long
[]
getActiveWindowHandles
()
{
public
static
long
[]
getActiveWindowHandles
()
{
AppContext
appContext
=
AppContext
.
getAppContext
();
AppContext
appContext
=
AppContext
.
getAppContext
();
if
(
appContext
==
null
)
return
null
;
synchronized
(
appContext
)
{
synchronized
(
appContext
)
{
List
<
WWindowPeer
>
l
=
(
List
<
WWindowPeer
>)
appContext
.
get
(
ACTIVE_WINDOWS_KEY
);
List
<
WWindowPeer
>
l
=
(
List
<
WWindowPeer
>)
appContext
.
get
(
ACTIVE_WINDOWS_KEY
);
if
(
l
==
null
)
{
if
(
l
==
null
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录