Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
6d3e5208
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看板
提交
6d3e5208
编写于
2月 19, 2014
作者:
P
pchelko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8034870: Regression: On Mac, fx app can't be launched if setting a javaagent for it
Reviewed-by: serb, art, anthony
上级
da9f251c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
8 deletion
+21
-8
src/macosx/native/sun/awt/LWCToolkit.m
src/macosx/native/sun/awt/LWCToolkit.m
+9
-8
src/macosx/native/sun/awt/awt.m
src/macosx/native/sun/awt/awt.m
+1
-0
src/macosx/native/sun/osxapp/ThreadUtilities.h
src/macosx/native/sun/osxapp/ThreadUtilities.h
+2
-0
src/macosx/native/sun/osxapp/ThreadUtilities.m
src/macosx/native/sun/osxapp/ThreadUtilities.m
+9
-0
未找到文件。
src/macosx/native/sun/awt/LWCToolkit.m
浏览文件 @
6d3e5208
...
...
@@ -188,14 +188,15 @@ JNIEXPORT void JNICALL
Java_sun_lwawt_macosx_LWCToolkit_initIDs
(
JNIEnv
*
env
,
jclass
klass
)
{
// set thread names
dispatch_async
(
dispatch_get_main_queue
(),
^
(
void
){
[[
NSThread
currentThread
]
setName
:
@"AppKit Thread"
];
JNIEnv
*
env
=
[
ThreadUtilities
getJNIEnv
];
static
JNF_CLASS_CACHE
(
jc_LWCToolkit
,
"sun/lwawt/macosx/LWCToolkit"
);
static
JNF_STATIC_MEMBER_CACHE
(
jsm_installToolkitThreadInJava
,
jc_LWCToolkit
,
"installToolkitThreadInJava"
,
"()V"
);
JNFCallStaticVoidMethod
(
env
,
jsm_installToolkitThreadInJava
);
});
if
(
!
[
ThreadUtilities
isAWTEmbedded
])
{
dispatch_async
(
dispatch_get_main_queue
(),
^
(
void
){
[[
NSThread
currentThread
]
setName
:
@"AppKit Thread"
];
JNIEnv
*
env
=
[
ThreadUtilities
getJNIEnv
];
static
JNF_CLASS_CACHE
(
jc_LWCToolkit
,
"sun/lwawt/macosx/LWCToolkit"
);
static
JNF_STATIC_MEMBER_CACHE
(
jsm_installToolkitThreadInJava
,
jc_LWCToolkit
,
"installToolkitThreadInJava"
,
"()V"
);
JNFCallStaticVoidMethod
(
env
,
jsm_installToolkitThreadInJava
);
});
}
gNumberOfButtons
=
sun_lwawt_macosx_LWCToolkit_BUTTONS
;
...
...
src/macosx/native/sun/awt/awt.m
浏览文件 @
6d3e5208
...
...
@@ -363,6 +363,7 @@ AWT_ASSERT_APPKIT_THREAD;
// AppKit Application.
NSApplication
*
app
=
[
NSApplicationAWT
sharedApplication
];
isEmbedded
=
!
[
NSApp
isKindOfClass
:[
NSApplicationAWT
class
]];
[
ThreadUtilities
setAWTEmbedded
:
isEmbedded
];
if
(
!
isEmbedded
)
{
// Install run loop observers and set the AppKit Java thread name
...
...
src/macosx/native/sun/osxapp/ThreadUtilities.h
浏览文件 @
6d3e5208
...
...
@@ -129,6 +129,8 @@ __attribute__((visibility("default")))
+
(
JNIEnv
*
)
getJNIEnvUncached
;
+
(
void
)
detachCurrentThread
;
+
(
void
)
setAppkitThreadGroup
:(
jobject
)
group
;
+
(
void
)
setAWTEmbedded
:(
BOOL
)
embedded
;
+
(
BOOL
)
isAWTEmbedded
;
//Wrappers for the corresponding JNFRunLoop methods with a check for main thread
+
(
void
)
performOnMainThreadWaiting
:(
BOOL
)
wait
block
:(
void
(
^
)())
block
;
...
...
src/macosx/native/sun/osxapp/ThreadUtilities.m
浏览文件 @
6d3e5208
...
...
@@ -34,6 +34,7 @@
JavaVM
*
jvm
=
NULL
;
static
JNIEnv
*
appKitEnv
=
NULL
;
static
jobject
appkitThreadGroup
=
NULL
;
static
BOOL
awtEmbedded
=
NO
;
inline
void
attachCurrentThread
(
void
**
env
)
{
if
([
NSThread
isMainThread
])
{
...
...
@@ -87,6 +88,14 @@ AWT_ASSERT_APPKIT_THREAD;
}
}
+
(
void
)
setAWTEmbedded
:(
BOOL
)
embedded
{
awtEmbedded
=
embedded
;
}
+
(
BOOL
)
isAWTEmbedded
{
return
awtEmbedded
;
}
@end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录