|
Re-land: base: Fix registering of memory pressure listeners used when emulating discardable memory.
Memory pressure listeners need to be created on a thread with a message
loop current. Discardable memory is often used on worker threads that
don't have a message loop and with the current system where listeners
are registered on first use, the result is that we're most likely never
notified of memory pressure.
This adds a function to the discardable memory interface that allows us
to register memory pressure listeners on a thread, and at a time, when
we know a message loop is current.
BUG= 332570
TBR=jamesr@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244641
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+126 lines, -22 lines) |
Patch |
 |
M |
base/memory/discardable_memory.h
|
View
|
1
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_android.cc
|
View
|
1
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_emulated.h
|
View
|
1
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_emulated.cc
|
View
|
1
|
2 chunks |
+15 lines, -5 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_linux.cc
|
View
|
1
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_mac.cc
|
View
|
1
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_provider.h
|
View
|
1
|
3 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_provider.cc
|
View
|
1
2
|
4 chunks |
+33 lines, -15 lines |
1 comment
|
Download
|
 |
M |
base/memory/discardable_memory_provider_unittest.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_unittest.cc
|
View
|
1
|
2 chunks |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/memory/discardable_memory_win.cc
|
View
|
1
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_thread_impl.cc
|
View
|
1
2
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
Total messages: 11 (0 generated)
|