Chromium Code Reviews| Index: src/platform-macos.cc |
| =================================================================== |
| --- src/platform-macos.cc (revision 10282) |
| +++ src/platform-macos.cc (working copy) |
| @@ -473,20 +473,14 @@ |
| pthread_t thread_; // Thread handle for pthread. |
| }; |
| + |
| Thread::Thread(const Options& options) |
| : data_(new PlatformData), |
| - stack_size_(options.stack_size) { |
| - set_name(options.name); |
| + stack_size_(options.stack_size()) { |
| + set_name(options.name()); |
| } |
| -Thread::Thread(const char* name) |
| - : data_(new PlatformData), |
| - stack_size_(0) { |
| - set_name(name); |
| -} |
| - |
| - |
| Thread::~Thread() { |
| delete data_; |
| } |
| @@ -736,10 +730,14 @@ |
| thread_act_t profiled_thread_; |
| }; |
| + |
| +static const int kSamplerThreadStackSize = 32 * KB; |
|
Vyacheslav Egorov (Chromium)
2011/12/21 13:22:12
sometimes you put constants into the class, someti
|
| + |
| + |
| class SamplerThread : public Thread { |
| public: |
| explicit SamplerThread(int interval) |
| - : Thread("SamplerThread"), |
| + : Thread(Thread::Options("SamplerThread", kSamplerThreadStackSize)), |
| interval_(interval) {} |
| static void AddActiveSampler(Sampler* sampler) { |