提交 87f14a54 编写于 作者: A alexsch

8049198: [macosx] Incorrect thread access when showing splash screen

Reviewed-by: serb, pchelko
上级 96638d6f
......@@ -45,6 +45,7 @@
#include <dlfcn.h>
#include <sizecalc.h>
#import "ThreadUtilities.h"
static NSScreen* SplashNSScreen()
{
......@@ -130,7 +131,11 @@ char* SplashGetScaledImageName(const char* jar, const char* file,
NSAutoreleasePool *pool = [NSAutoreleasePool new];
*scaleFactor = 1;
char* scaledFile = nil;
float screenScaleFactor = [SplashNSScreen() backingScaleFactor];
__block float screenScaleFactor = 1;
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
screenScaleFactor = [SplashNSScreen() backingScaleFactor];
}];
if (screenScaleFactor > 1) {
NSString *fileName = [NSString stringWithUTF8String: file];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册