summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:26:46 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:26:46 +0000
commit2200f986f00013c4d159f9e76337829a7a65fd75 (patch)
tree3a259978bd1f1ba21ea9022ed4068bbca374c31b
parentd520764377e3dd5766e65a1535446f04b1e2e555 (diff)
downloadchromium_src-2200f986f00013c4d159f9e76337829a7a65fd75.zip
chromium_src-2200f986f00013c4d159f9e76337829a7a65fd75.tar.gz
chromium_src-2200f986f00013c4d159f9e76337829a7a65fd75.tar.bz2
Mac: Eliminiate @interface NoOp from base.
I don't think eliminating _all_ objc from base is the right answer -- the remaining objc has to move out of the static libbase. But if it's easy to have fewer objc to move, that's good. BUG=46929 TEST=One fewer duplicate symbol is reported when loading the pdf plugin. Review URL: http://codereview.chromium.org/5716007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69077 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/platform_thread_mac.mm20
1 files changed, 3 insertions, 17 deletions
diff --git a/base/platform_thread_mac.mm b/base/platform_thread_mac.mm
index 34afea7..36e08be 100644
--- a/base/platform_thread_mac.mm
+++ b/base/platform_thread_mac.mm
@@ -9,21 +9,6 @@
#include "base/logging.h"
-// A simple class that demonstrates our impressive ability to do nothing.
-@interface NoOp : NSObject
-
-// Does the deed. Or does it?
-+ (void)noOp;
-
-@end
-
-@implementation NoOp
-
-+ (void)noOp {
-}
-
-@end
-
namespace base {
// If Cocoa is to be used on more than one thread, it must know that the
@@ -37,8 +22,9 @@ namespace base {
void InitThreading() {
static BOOL multithreaded = [NSThread isMultiThreaded];
if (!multithreaded) {
- [NSThread detachNewThreadSelector:@selector(noOp)
- toTarget:[NoOp class]
+ // +[NSObject class] is idempotent.
+ [NSThread detachNewThreadSelector:@selector(class)
+ toTarget:[NSObject class]
withObject:nil];
multithreaded = YES;