summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/profiler/ProfilerServer.mm
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
committerFeng Qian <fqian@google.com>2009-06-17 12:12:20 -0700
commit5f1ab04193ad0130ca8204aadaceae083aca9881 (patch)
tree5a92cd389e2cfe7fb67197ce14b38469462379f8 /JavaScriptCore/profiler/ProfilerServer.mm
parent194315e5a908cc8ed67d597010544803eef1ac59 (diff)
downloadexternal_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.zip
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.gz
external_webkit-5f1ab04193ad0130ca8204aadaceae083aca9881.tar.bz2
Get WebKit r44544.
Diffstat (limited to 'JavaScriptCore/profiler/ProfilerServer.mm')
-rw-r--r--JavaScriptCore/profiler/ProfilerServer.mm11
1 files changed, 10 insertions, 1 deletions
diff --git a/JavaScriptCore/profiler/ProfilerServer.mm b/JavaScriptCore/profiler/ProfilerServer.mm
index ef16f4c..a3944de 100644
--- a/JavaScriptCore/profiler/ProfilerServer.mm
+++ b/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];