Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
95dff3b9
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看板
提交
95dff3b9
编写于
11月 19, 2016
作者:
D
dbuck
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8022291: Mac OS: Unexpected JavaLaunchHelper message displaying
Reviewed-by: serb, ksrini
上级
916bcfda
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
18 addition
and
38 deletion
+18
-38
src/macosx/bin/java_md_macosx.c
src/macosx/bin/java_md_macosx.c
+18
-38
未找到文件。
src/macosx/bin/java_md_macosx.c
浏览文件 @
95dff3b9
...
@@ -1004,32 +1004,6 @@ SetXStartOnFirstThreadArg()
...
@@ -1004,32 +1004,6 @@ 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
,
...
@@ -1039,20 +1013,26 @@ JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
...
@@ -1039,20 +1013,26 @@ 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
=
0
;
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
{
NSBlockOperation
*
op
=
[
NSBlockOperation
blockOperationWithBlock
:
^
{
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
;
int
rslt
;
rslt
=
JavaMain
(
&
args
);
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
}];
{
JavaLaunchHelper
*
launcher
=
[[[
JavaLaunchHelper
alloc
]
init
]
autorelease
];
/*
[
launcher
performSelectorOnMainThread
:
@
selector
(
launchJava
:
)
* We cannot use dispatch_sync here, because it blocks the main dispatch queue.
withObject:
[
NSValue
valueWithPointer
:
(
void
*
)
&
args
]
* Using the main NSRunLoop allows the dispatch queue to run properly once
waitUntilDone:
YES
];
* SWT (or whatever toolkit this is needed for) kicks off it's own NSRunLoop
rslt
=
[
launcher
getReturnValue
];
* and starts running.
*/
[
op
performSelectorOnMainThread
:
@
selector
(
start
)
withObject
:
nil
waitUntilDone
:
YES
];
}
}
[
pool
drain
];
[
pool
drain
];
return
rslt
;
return
rslt
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录