Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
2acf5eee
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看板
提交
2acf5eee
编写于
5月 29, 2013
作者:
P
pchelko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8009911: [macosx] SWT app freeze when going full screen using Java 7 on Mac
Reviewed-by: anthony, ksrini
上级
eaa3d6c4
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
42 addition
and
11 deletion
+42
-11
src/macosx/bin/java_md_macosx.c
src/macosx/bin/java_md_macosx.c
+42
-11
未找到文件。
src/macosx/bin/java_md_macosx.c
浏览文件 @
2acf5eee
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
#include <Cocoa/Cocoa.h>
#include <Cocoa/Cocoa.h>
#include <objc/objc-runtime.h>
#include <objc/objc-runtime.h>
#include <objc/objc-auto.h>
#include <objc/objc-auto.h>
#include <dispatch/dispatch.h>
#include <errno.h>
#include <errno.h>
#include <spawn.h>
#include <spawn.h>
...
@@ -1001,6 +1000,32 @@ SetXStartOnFirstThreadArg()
...
@@ -1001,6 +1000,32 @@ SetXStartOnFirstThreadArg()
setenv
(
envVar
,
"1"
,
1
);
setenv
(
envVar
,
"1"
,
1
);
}
}
/* This class is made for performSelectorOnMainThread when java main
* should be launched on main thread.
* We cannot use dispatch_sync here, because it blocks the main dispatch queue
* which is used inside Cocoa
*/
@
interface
JavaLaunchHelper
:
NSObject
{
int
_returnValue
;
}
-
(
void
)
launchJava
:
(
NSValue
*
)
argsValue
;
-
(
int
)
getReturnValue
;
@
end
@
implementation
JavaLaunchHelper
-
(
void
)
launchJava
:
(
NSValue
*
)
argsValue
{
_returnValue
=
JavaMain
([
argsValue
pointerValue
]);
}
-
(
int
)
getReturnValue
{
return
_returnValue
;
}
@
end
// MacOSX we may continue in the same thread
// MacOSX we may continue in the same thread
int
int
JVMInit
(
InvocationFunctions
*
ifn
,
jlong
threadStackSize
,
JVMInit
(
InvocationFunctions
*
ifn
,
jlong
threadStackSize
,
...
@@ -1010,16 +1035,22 @@ JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
...
@@ -1010,16 +1035,22 @@ JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
JLI_TraceLauncher
(
"In same thread
\n
"
);
JLI_TraceLauncher
(
"In same thread
\n
"
);
// need to block this thread against the main thread
// need to block this thread against the main thread
// so signals get caught correctly
// so signals get caught correctly
__block
int
rslt
;
dispatch_sync
(
dispatch_get_main_queue
(),
^
(
void
)
{
JavaMainArgs
args
;
JavaMainArgs
args
;
args
.
argc
=
argc
;
args
.
argc
=
argc
;
args
.
argv
=
argv
;
args
.
argv
=
argv
;
args
.
mode
=
mode
;
args
.
mode
=
mode
;
args
.
what
=
what
;
args
.
what
=
what
;
args
.
ifn
=
*
ifn
;
args
.
ifn
=
*
ifn
;
rslt
=
JavaMain
((
void
*
)
&
args
);
int
rslt
;
});
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
{
JavaLaunchHelper
*
launcher
=
[[[
JavaLaunchHelper
alloc
]
init
]
autorelease
];
[
launcher
performSelectorOnMainThread
:
@
selector
(
launchJava
:
)
withObject:
[
NSValue
valueWithPointer
:
(
void
*
)
&
args
]
waitUntilDone:
YES
];
rslt
=
[
launcher
getReturnValue
];
}
[
pool
drain
];
return
rslt
;
return
rslt
;
}
else
{
}
else
{
return
ContinueInNewThread
(
ifn
,
threadStackSize
,
argc
,
argv
,
mode
,
what
,
ret
);
return
ContinueInNewThread
(
ifn
,
threadStackSize
,
argc
,
argv
,
mode
,
what
,
ret
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录