Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: base/message_loop/message_loop.cc

Issue 1194673004: Don't peek messages in the MessagePumpForUI class when we receive our kMsgHaveWork message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the crash reported in bug 501602. The patch description has been updated with comments about th… Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 // for some tasks. 633 // for some tasks.
634 bool high_res = pending_high_res_tasks_ > 0; 634 bool high_res = pending_high_res_tasks_ > 0;
635 if (high_res != in_high_res_mode_) { 635 if (high_res != in_high_res_mode_) {
636 in_high_res_mode_ = high_res; 636 in_high_res_mode_ = high_res;
637 Time::ActivateHighResolutionTimer(in_high_res_mode_); 637 Time::ActivateHighResolutionTimer(in_high_res_mode_);
638 } 638 }
639 #endif 639 #endif
640 return false; 640 return false;
641 } 641 }
642 642
643 TimeTicks MessageLoop::GetNewlyAddedTaskDelay() {
644 return incoming_task_queue_->GetNewlyAddedTaskDelay();
645 }
646
643 void MessageLoop::DeleteSoonInternal(const tracked_objects::Location& from_here, 647 void MessageLoop::DeleteSoonInternal(const tracked_objects::Location& from_here,
644 void(*deleter)(const void*), 648 void(*deleter)(const void*),
645 const void* object) { 649 const void* object) {
646 PostNonNestableTask(from_here, Bind(deleter, object)); 650 PostNonNestableTask(from_here, Bind(deleter, object));
647 } 651 }
648 652
649 void MessageLoop::ReleaseSoonInternal( 653 void MessageLoop::ReleaseSoonInternal(
650 const tracked_objects::Location& from_here, 654 const tracked_objects::Location& from_here,
651 void(*releaser)(const void*), 655 void(*releaser)(const void*),
652 const void* object) { 656 const void* object) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 persistent, 729 persistent,
726 mode, 730 mode,
727 controller, 731 controller,
728 delegate); 732 delegate);
729 } 733 }
730 #endif 734 #endif
731 735
732 #endif // !defined(OS_NACL_SFI) 736 #endif // !defined(OS_NACL_SFI)
733 737
734 } // namespace base 738 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698