diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.mm')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.mm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.mm b/src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.mm index ef16f4c..a3944de 100644 --- a/src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.mm +++ b/src/3rdparty/webkit/JavaScriptCore/profiler/ProfilerServer.mm @@ -28,9 +28,12 @@ #import "JSProfilerPrivate.h" #import "JSRetainPtr.h" - #import <Foundation/Foundation.h> +#if PLATFORM(IPHONE_SIMULATOR) +#import <Foundation/NSDistributedNotificationCenter.h> +#endif + @interface ProfilerServer : NSObject { @private NSString *_serverName; @@ -62,16 +65,22 @@ if ([defaults boolForKey:@"EnableJSProfiling"]) [self startProfiling]; +#if !PLATFORM(IPHONE) || PLATFORM(IPHONE_SIMULATOR) + // FIXME: <rdar://problem/6546135> // The catch-all notifications [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(startProfiling) name:@"ProfilerServerStartNotification" object:nil]; [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(stopProfiling) name:@"ProfilerServerStopNotification" object:nil]; +#endif // The specific notifications NSProcessInfo *processInfo = [NSProcessInfo processInfo]; _serverName = [[NSString alloc] initWithFormat:@"ProfilerServer-%d", [processInfo processIdentifier]]; +#if !PLATFORM(IPHONE) || PLATFORM(IPHONE_SIMULATOR) + // FIXME: <rdar://problem/6546135> [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(startProfiling) name:[_serverName stringByAppendingString:@"-Start"] object:nil]; [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(stopProfiling) name:[_serverName stringByAppendingString:@"-Stop"] object:nil]; +#endif [pool drain]; |