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

Unified Diff: base/memory/memory_pressure_listener.h

Issue 25676002: base: Fix MemoryPressureListener documentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_pressure_listener.h
diff --git a/base/memory/memory_pressure_listener.h b/base/memory/memory_pressure_listener.h
index 7b8029dd712accdcb9b9e694cc9610493d68610b..90eb144f4b48813bf3ae95051df1f4b20f232168 100644
--- a/base/memory/memory_pressure_listener.h
+++ b/base/memory/memory_pressure_listener.h
@@ -24,11 +24,8 @@ namespace base {
// simply delete the listener object. The implementation guarantees
// that the callback will always be called on the thread that created
// the listener.
-// If this is the same thread as the system is broadcasting the memory pressure
-// event on, then it is guaranteed you're called synchronously within that
-// broadcast and hence you should not do long-running garbage collection work.
-// But conversely, if there's something that needs to be released before
-// control is returned to system code, this is the place to do it.
+// Note that even on the same thread, the callback is not guaranteed to be
+// called synchronously within the system memory pressure broadcast.
// Please see notes on memory_pressure_level_list.h: some levels are absolutely
// critical, and if not enough memory is returned to the system, it'll
// potentially kill the app, and then later the app will have to be
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698