Changeset 31611 in vbox for trunk/src/VBox
- Timestamp:
- Aug 12, 2010 3:59:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/EventQueue.cpp
r31601 r31611 286 286 orc = orc2; 287 287 } 288 if ( orc == 0289 || 288 if ( orc == 0 /*???*/ 289 || orc == kCFRunLoopRunHandledSource) 290 290 return VINF_SUCCESS; 291 if ( 292 || 291 if ( orc == kCFRunLoopRunStopped 292 || orc == kCFRunLoopRunFinished) 293 293 return VERR_INTERRUPTED; 294 294 AssertMsg(orc == kCFRunLoopRunTimedOut, ("Unexpected status code from CFRunLoopRunInMode: %#x", orc)); … … 419 419 * Process pending XPCOM events. 420 420 * @param pQueue The queue to process events on. 421 * @returns VINF_SUCCESS or VERR_TIMEOUT. 421 * @retval VINF_SUCCESS 422 * @retval VERR_TIMEOUT 423 * @retval VERR_INTERRUPTED (darwin only) 424 * @retval VERR_INTERNAL_ERROR_2 422 425 */ 423 426 static int processPendingEvents(nsIEventQueue *pQueue) 424 427 { 425 /* Check for timeout condition so the caller can be a bit more lazy. */428 /* ProcessPendingEvents doesn't report back what it did, so check here. */ 426 429 PRBool fHasEvents = PR_FALSE; 427 430 nsresult hr = pQueue->PendingEvents(&fHasEvents); 428 431 if (NS_FAILED(hr)) 429 432 return VERR_INTERNAL_ERROR_2; 430 if (!fHasEvents) 431 return VERR_TIMEOUT; 432 433 pQueue->ProcessPendingEvents(); 434 return VINF_SUCCESS; 433 434 /* Process pending events. */ 435 int rc = VINF_SUCCESS; 436 if (fHasEvents) 437 pQueue->ProcessPendingEvents(); 438 else 439 rc = VERR_TIMEOUT; 440 441 # ifdef RT_OS_DARWIN 442 /* Process pending native events. */ 443 int rc2 = waitForEventsOnDarwin(0); 444 if (rc == VERR_TIMEOUT || rc2 == VERR_INTERRUPTED) 445 rc = rc2; 446 # endif 447 448 return rc; 435 449 } 436 450
Note:
See TracChangeset
for help on using the changeset viewer.