| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3760 if (already_signalled_) { | 3760 if (already_signalled_) { |
| 3761 return; | 3761 return; |
| 3762 } | 3762 } |
| 3763 already_signalled_ = true; | 3763 already_signalled_ = true; |
| 3764 } | 3764 } |
| 3765 sem_->Signal(); | 3765 sem_->Signal(); |
| 3766 } | 3766 } |
| 3767 | 3767 |
| 3768 | 3768 |
| 3769 void MessageDispatchHelperThread::Run() { | 3769 void MessageDispatchHelperThread::Run() { |
| 3770 Isolate* isolate = Isolate::Current(); |
| 3770 while (true) { | 3771 while (true) { |
| 3771 sem_->Wait(); | 3772 sem_->Wait(); |
| 3772 { | 3773 { |
| 3773 ScopedLock lock(mutex_); | 3774 ScopedLock lock(mutex_); |
| 3774 already_signalled_ = false; | 3775 already_signalled_ = false; |
| 3775 } | 3776 } |
| 3776 { | 3777 { |
| 3777 Locker locker; | 3778 Locker locker(reinterpret_cast<v8::Isolate*>(isolate)); |
| 3778 Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3779 isolate->debugger()->CallMessageDispatchHandler(); |
| 3779 } | 3780 } |
| 3780 } | 3781 } |
| 3781 } | 3782 } |
| 3782 | 3783 |
| 3783 #endif // ENABLE_DEBUGGER_SUPPORT | 3784 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3784 | 3785 |
| 3785 } } // namespace v8::internal | 3786 } } // namespace v8::internal |
| OLD | NEW |