提交 8e3fba6f 编写于 作者: A asaha

Merge

......@@ -456,6 +456,7 @@ c4b37246b92736adf5f40c785aabb67a7d227245 jdk8u60-b23
d433f5fd8910bee1f2c295b65cf03977034fe0ea jdk8u60-b24
c8cfbe57bcd5042d2fef42dcef14d73dd4bdc416 jdk8u60-b25
0d6a8a9b26a37678b420ff540b5a622c3f4fd44c jdk8u60-b26
afbc08ea922bf6e5e14d2eea24a2f94f37627ea7 jdk8u60-b27
286b9a885fcc6245fdf2b20697473ec3b35f2538 jdk8u65-b00
80a796d0db958f49a4b0713818227eda8e5efbb9 jdk8u65-b01
77d48e6d111faec236c8678997ae4311151cfee4 jdk8u65-b02
......
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -40,10 +40,17 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFRetainedResource_nativeCFRelease
if (releaseOnAppKitThread) {
// 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));
}];
// pointers after the nested loop is exited
if ([NSApp respondsToSelector:@selector(postRunnableEvent:)]) {
[NSApp postRunnableEvent:^() {
CFRelease(jlong_to_ptr(ptr));
}];
} else {
// could happen if we are embedded inside SWT/FX application,
[JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() {
CFRelease(jlong_to_ptr(ptr));
}];
}
} else {
JNF_COCOA_ENTER(env);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册