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

Merge

...@@ -456,3 +456,4 @@ c4b37246b92736adf5f40c785aabb67a7d227245 jdk8u60-b23 ...@@ -456,3 +456,4 @@ c4b37246b92736adf5f40c785aabb67a7d227245 jdk8u60-b23
d433f5fd8910bee1f2c295b65cf03977034fe0ea jdk8u60-b24 d433f5fd8910bee1f2c295b65cf03977034fe0ea jdk8u60-b24
c8cfbe57bcd5042d2fef42dcef14d73dd4bdc416 jdk8u60-b25 c8cfbe57bcd5042d2fef42dcef14d73dd4bdc416 jdk8u60-b25
0d6a8a9b26a37678b420ff540b5a622c3f4fd44c jdk8u60-b26 0d6a8a9b26a37678b420ff540b5a622c3f4fd44c jdk8u60-b26
afbc08ea922bf6e5e14d2eea24a2f94f37627ea7 jdk8u60-b27
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -41,10 +41,17 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFRetainedResource_nativeCFRelease ...@@ -41,10 +41,17 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CFRetainedResource_nativeCFRelease
// Releasing resources on the main AppKit message loop only // Releasing resources on the main AppKit message loop only
// Releasing resources on the nested loops may cause dangling // Releasing resources on the nested loops may cause dangling
// pointers after the nested loop is exited // pointers after the nested loop is exited
[NSApp postRunnableEvent:^(){ if ([NSApp respondsToSelector:@selector(postRunnableEvent:)]) {
[NSApp postRunnableEvent:^() {
CFRelease(jlong_to_ptr(ptr)); CFRelease(jlong_to_ptr(ptr));
}]; }];
} else { } 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); JNF_COCOA_ENTER(env);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册