| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 smsg.thread->socketserver()->WakeUp(); | 452 smsg.thread->socketserver()->WakeUp(); |
| 453 continue; | 453 continue; |
| 454 } | 454 } |
| 455 ++iter; | 455 ++iter; |
| 456 } | 456 } |
| 457 | 457 |
| 458 MessageQueue::Clear(phandler, id, removed); | 458 MessageQueue::Clear(phandler, id, removed); |
| 459 } | 459 } |
| 460 | 460 |
| 461 bool Thread::ProcessMessages(int cmsLoop) { | 461 bool Thread::ProcessMessages(int cmsLoop) { |
| 462 uint32_t msEnd = (kForever == cmsLoop) ? 0 : TimeAfter(cmsLoop); | 462 int64_t msEnd = (kForever == cmsLoop) ? 0 : TimeAfter(cmsLoop); |
| 463 int cmsNext = cmsLoop; | 463 int cmsNext = cmsLoop; |
| 464 | 464 |
| 465 while (true) { | 465 while (true) { |
| 466 #if __has_feature(objc_arc) | 466 #if __has_feature(objc_arc) |
| 467 @autoreleasepool | 467 @autoreleasepool |
| 468 #elif defined(WEBRTC_MAC) | 468 #elif defined(WEBRTC_MAC) |
| 469 // see: http://developer.apple.com/library/mac/#documentation/Cocoa/Referenc
e/Foundation/Classes/NSAutoreleasePool_Class/Reference/Reference.html | 469 // see: http://developer.apple.com/library/mac/#documentation/Cocoa/Referenc
e/Foundation/Classes/NSAutoreleasePool_Class/Reference/Reference.html |
| 470 // Each thread is supposed to have an autorelease pool. Also for event loops | 470 // Each thread is supposed to have an autorelease pool. Also for event loops |
| 471 // like this, autorelease pool needs to be created and drained/released | 471 // like this, autorelease pool needs to be created and drained/released |
| 472 // for each cycle. | 472 // for each cycle. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 if (SUCCEEDED(hr)) { | 533 if (SUCCEEDED(hr)) { |
| 534 Thread::Run(); | 534 Thread::Run(); |
| 535 CoUninitialize(); | 535 CoUninitialize(); |
| 536 } else { | 536 } else { |
| 537 LOG(LS_ERROR) << "CoInitialize failed, hr=" << hr; | 537 LOG(LS_ERROR) << "CoInitialize failed, hr=" << hr; |
| 538 } | 538 } |
| 539 } | 539 } |
| 540 #endif | 540 #endif |
| 541 | 541 |
| 542 } // namespace rtc | 542 } // namespace rtc |
| OLD | NEW |