Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: base/platform_thread_mac.mm

Issue 5716007: Mac: Eliminiate @interface NoOp from base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: call class, since initialize is guaranteed to run only once Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_thread_mac.mm
diff --git a/base/platform_thread_mac.mm b/base/platform_thread_mac.mm
index 34afea7c1efef6ab37eaf076d8352587e8a02f1e..36e08be9e86395dcd738a3b1ef930e130f413a49 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698