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

Unified Diff: mojo/edk/system/awakable_list.cc

Issue 2090763002: AwakableList: For persistent awakables, make Add() call Awake() with reason INITIALIZE. (Closed) Base URL: https://github.com/domokit/mojo.git@work795_wait_set_4.7-x-work794_wait_set_4.6
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/awakable_list.h ('k') | mojo/edk/system/awakable_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/awakable_list.cc
diff --git a/mojo/edk/system/awakable_list.cc b/mojo/edk/system/awakable_list.cc
index b2dde2db1f7b98ae1b7b4fe90cc7f8598ed97422..56fedd21414984eb040202b98ebd489b37f4b4f4 100644
--- a/mojo/edk/system/awakable_list.cc
+++ b/mojo/edk/system/awakable_list.cc
@@ -76,8 +76,11 @@ void AwakableList::CancelAndRemoveAll() {
void AwakableList::Add(Awakable* awakable,
uint64_t context,
bool persistent,
- MojoHandleSignals signals) {
+ MojoHandleSignals signals,
+ const HandleSignalsState& current_state) {
awakables_.push_back(AwakeInfo(awakable, context, persistent, signals));
+ if (persistent)
+ awakable->Awake(context, Awakable::AwakeReason::INITIALIZE, current_state);
}
void AwakableList::Remove(bool match_context,
« no previous file with comments | « mojo/edk/system/awakable_list.h ('k') | mojo/edk/system/awakable_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698