OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3030 } | 3030 } |
3031 | 3031 |
3032 | 3032 |
3033 void LockingCommandMessageQueue::Clear() { | 3033 void LockingCommandMessageQueue::Clear() { |
3034 ScopedLock sl(lock_); | 3034 ScopedLock sl(lock_); |
3035 queue_.Clear(); | 3035 queue_.Clear(); |
3036 } | 3036 } |
3037 | 3037 |
3038 | 3038 |
3039 MessageDispatchHelperThread::MessageDispatchHelperThread() | 3039 MessageDispatchHelperThread::MessageDispatchHelperThread() |
3040 : sem_(OS::CreateSemaphore(0)), mutex_(OS::CreateMutex()), | 3040 : |
| 3041 #ifdef DEBUG_THREAD_NAMES |
| 3042 Thread("v8:MsgDispHelpr"), |
| 3043 #endif |
| 3044 sem_(OS::CreateSemaphore(0)), mutex_(OS::CreateMutex()), |
3041 already_signalled_(false) { | 3045 already_signalled_(false) { |
3042 } | 3046 } |
3043 | 3047 |
3044 | 3048 |
3045 MessageDispatchHelperThread::~MessageDispatchHelperThread() { | 3049 MessageDispatchHelperThread::~MessageDispatchHelperThread() { |
3046 delete mutex_; | 3050 delete mutex_; |
3047 delete sem_; | 3051 delete sem_; |
3048 } | 3052 } |
3049 | 3053 |
3050 | 3054 |
(...skipping 19 matching lines...) Expand all Loading... |
3070 { | 3074 { |
3071 Locker locker; | 3075 Locker locker; |
3072 Debugger::CallMessageDispatchHandler(); | 3076 Debugger::CallMessageDispatchHandler(); |
3073 } | 3077 } |
3074 } | 3078 } |
3075 } | 3079 } |
3076 | 3080 |
3077 #endif // ENABLE_DEBUGGER_SUPPORT | 3081 #endif // ENABLE_DEBUGGER_SUPPORT |
3078 | 3082 |
3079 } } // namespace v8::internal | 3083 } } // namespace v8::internal |
OLD | NEW |