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

Issue 129963002: Re-land: base: Fix registering of memory pressure listeners used when emulating discardable memory. (Closed)

Created:
6 years, 11 months ago by reveman
Modified:
6 years, 11 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, erikwright+watch_chromium.org, jam, gavinp+memory_chromium.org
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : Require memory pressure listener to be registered #

Patch Set 3 : Temporarily disable memory_pressure_listener DCHECK #

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

Messages

Total messages: 11 (0 generated)
reveman
Please take a look.
6 years, 11 months ago (2014-01-09 00:29:19 UTC) #1
reveman
Latest patch requires memory pressure listener to be registered and adds a DCHECK to ensure ...
6 years, 11 months ago (2014-01-10 06:44:38 UTC) #2
willchan no longer on Chromium
lgtm
6 years, 11 months ago (2014-01-10 07:01:02 UTC) #3
reveman
6 years, 11 months ago (2014-01-10 17:54:13 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/129963002/30001
6 years, 11 months ago (2014-01-10 18:03:35 UTC) #5
commit-bot: I haz the power
Change committed as 244229
6 years, 11 months ago (2014-01-10 20:18:40 UTC) #6
reveman
https://codereview.chromium.org/129963002/diff/510001/base/memory/discardable_memory_provider.cc File base/memory/discardable_memory_provider.cc (right): https://codereview.chromium.org/129963002/diff/510001/base/memory/discardable_memory_provider.cc#newcode75 base/memory/discardable_memory_provider.cc:75: // DCHECK(memory_pressure_listener_); Disabled this DCHECK for now as it's ...
6 years, 11 months ago (2014-01-13 18:22:27 UTC) #7
willchan no longer on Chromium
OK
6 years, 11 months ago (2014-01-13 18:23:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/129963002/510001
6 years, 11 months ago (2014-01-13 18:25:16 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/129963002/510001
6 years, 11 months ago (2014-01-13 23:26:41 UTC) #10
commit-bot: I haz the power
6 years, 11 months ago (2014-01-14 03:09:29 UTC) #11
Message was sent while issue was closed.
Change committed as 244641

Powered by Google App Engine
This is Rietveld 408576698