Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
c43477ee
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看板
提交
c43477ee
编写于
6月 04, 2015
作者:
A
anashaty
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8068886: IDEA IntelliJ crashes in objc_msgSend when an accessibility tool is enabled
Reviewed-by: serb, bae
上级
f4327351
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
48 addition
and
10 deletion
+48
-10
src/macosx/native/sun/awt/CFRetainedResource.m
src/macosx/native/sun/awt/CFRetainedResource.m
+5
-1
src/macosx/native/sun/awt/LWCToolkit.m
src/macosx/native/sun/awt/LWCToolkit.m
+3
-1
src/macosx/native/sun/osxapp/NSApplicationAWT.h
src/macosx/native/sun/osxapp/NSApplicationAWT.h
+1
-0
src/macosx/native/sun/osxapp/NSApplicationAWT.m
src/macosx/native/sun/osxapp/NSApplicationAWT.m
+32
-1
src/share/classes/sun/awt/datatransfer/DataTransferer.java
src/share/classes/sun/awt/datatransfer/DataTransferer.java
+7
-7
未找到文件。
src/macosx/native/sun/awt/CFRetainedResource.m
浏览文件 @
c43477ee
...
...
@@ -23,6 +23,7 @@
* questions.
*/
#import
<Cocoa
/
Cocoa.h
>
#import
<JavaNativeFoundation
/
JavaNativeFoundation.h
>
#import "sun_lwawt_macosx_CFRetainedResource.h"
...
...
@@ -37,7 +38,10 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFRetainedResource_nativeCFRelease
(JNIEnv *env, jclass clazz, jlong ptr, jboolean releaseOnAppKitThread)
{
if (releaseOnAppKitThread) {
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
// Releasing resources on the main AppKit message loop only
// Releasing resources on the nested loops may cause dangling
// pointers after the nested loop is exited
[NSApp postRunnableEvent:^(){
CFRelease(jlong_to_ptr(ptr));
}];
} else {
...
...
src/macosx/native/sun/awt/LWCToolkit.m
浏览文件 @
c43477ee
...
...
@@ -339,8 +339,10 @@ JNF_COCOA_ENTER(env);
beforeDate:
[
NSDate
dateWithTimeIntervalSinceNow
:
0
.
010
]];
if
(
processEvents
)
{
//We do not spin a runloop here as date is nil, so does not matter which mode to use
// Processing all events excluding NSApplicationDefined which need to be processed
// on the main loop only (those events are intended for disposing resources)
NSEvent
*
event
;
if
((
event
=
[
NSApp
nextEventMatchingMask
:
NSAnyEventMask
if
((
event
=
[
NSApp
nextEventMatchingMask
:
(
NSAnyEventMask
&
~
NSApplicationDefined
)
untilDate:
nil
inMode:
NSDefaultRunLoopMode
dequeue:
YES
])
!=
nil
)
{
...
...
src/macosx/native/sun/osxapp/NSApplicationAWT.h
浏览文件 @
c43477ee
...
...
@@ -37,6 +37,7 @@
-
(
void
)
registerWithProcessManager
;
-
(
void
)
setDockIconWithEnv
:(
JNIEnv
*
)
env
;
-
(
void
)
postDummyEvent
;
-
(
void
)
postRunnableEvent
:(
void
(
^
)())
block
;
-
(
void
)
waitForDummyEvent
;
+
(
void
)
runAWTLoopWithApp
:(
NSApplication
*
)
app
;
...
...
src/macosx/native/sun/osxapp/NSApplicationAWT.m
浏览文件 @
c43477ee
...
...
@@ -338,9 +338,13 @@ AWT_ASSERT_APPKIT_THREAD;
-
(
void
)
sendEvent
:(
NSEvent
*
)
event
{
if
([
event
type
]
==
NSApplicationDefined
&&
TS_EQUAL
([
event
timestamp
],
dummyEventTimestamp
))
{
if
([
event
type
]
==
NSApplicationDefined
&&
TS_EQUAL
([
event
timestamp
],
dummyEventTimestamp
)
&&
[
event
subtype
]
==
0
)
{
[
seenDummyEventLock
lockWhenCondition
:
NO
];
[
seenDummyEventLock
unlockWithCondition
:
YES
];
}
else
if
([
event
type
]
==
NSApplicationDefined
&&
[
event
subtype
]
==
777
)
{
void
(
^
block
)()
=
(
void
(
^
)())
[
event
data1
];
block
();
[
block
release
];
}
else
if
([
event
type
]
==
NSKeyUp
&&
([
event
modifierFlags
]
&
NSCommandKeyMask
))
{
// Cocoa won't send us key up event when releasing a key while Cmd is down,
// so we have to do it ourselves.
...
...
@@ -350,6 +354,33 @@ AWT_ASSERT_APPKIT_THREAD;
}
}
/*
* Posts the block to the AppKit event queue which will be executed
* on the main AppKit loop.
* While running nested loops this event will be ignored.
*/
-
(
void
)
postRunnableEvent
:(
void
(
^
)())
block
{
void
(
^
copy
)()
=
[
block
copy
];
NSInteger
encode
=
(
NSInteger
)
copy
;
[
copy
retain
];
NSAutoreleasePool
*
pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSEvent
*
event
=
[
NSEvent
otherEventWithType
:
NSApplicationDefined
location:
NSMakePoint
(
0
,
0
)
modifierFlags:
0
timestamp:
0
windowNumber:
0
context:
nil
subtype:
777
data1:
encode
data2:
0
];
[
NSApp
postEvent
:
event
atStart
:
NO
];
[
pool
drain
];
}
-
(
void
)
postDummyEvent
{
seenDummyEventLock
=
[[
NSConditionLock
alloc
]
initWithCondition
:
NO
];
dummyEventTimestamp
=
[
NSProcessInfo
processInfo
].
systemUptime
;
...
...
src/share/classes/sun/awt/datatransfer/DataTransferer.java
浏览文件 @
c43477ee
...
...
@@ -2905,13 +2905,13 @@ search:
return
comp
;
}
if
(
flavor1
.
isFlavorTextType
())
{
return
1
;
}
if
(
flavor2
.
isFlavorTextType
())
{
return
-
1
;
}
//
if (flavor1.isFlavorTextType()) {
//
return 1;
//
}
//
//
if (flavor2.isFlavorTextType()) {
//
return -1;
//
}
// Next, look for application/x-java-* types. Prefer unknown
// MIME types because if the user provides his own data flavor,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录