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

Issue 1787973002: Replace blink::WebDiscardableMemory with base::DiscardableMemory. (Closed)

Created:
4 years, 9 months ago by jbroman
Modified:
4 years, 9 months ago
Reviewers:
danakj, esprehn
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace blink::WebDiscardableMemory with base::DiscardableMemory. * Inline WebDiscardableMemoryImpl into its only user, PurgeableVector, which is allowed to see base by virtue of being in platform. * Augment base::TestDiscardableMemoryAllocator's implementation with the same checks as Blink's. * Observing that the actual implementation never returns nullptr, remove logic that handles that (as other clients of base::DiscardableMemoryAllocator don't). * Supply a base::TestDiscardableMemoryAllocator in blink_platform_unittests. * Modify PurgeableVectorTest to vary only whether PurgeableVector requests discardable memory (PurgeableOption), since Blink's real platform (Chromium) does support it. Change all tests which don't vary in this way to be not parameterized. Committed: https://crrev.com/36fc372117d5c40162dc014aaba4bbb7e3d5779a Cr-Commit-Position: refs/heads/master@{#381378}

Patch Set 1 #

Patch Set 2 : a few non-functional fixes #

Patch Set 3 : #

Patch Set 4 : remove superfluous includes #

Patch Set 5 : missing OwnPtr/PassOwnPtr includes in SharedBufferTest #

Total comments: 2

Patch Set 6 : use StringPiece::as_string #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -364 lines) Patch
M base/test/test_discardable_memory_allocator.cc View 3 chunks +24 lines, -5 lines 0 comments Download
M content/child/blink_platform_impl.h View 1 chunk +0 lines, -2 lines 0 comments Download
M content/child/blink_platform_impl.cc View 2 chunks +0 lines, -6 lines 0 comments Download
D content/child/web_discardable_memory_impl.h View 1 chunk +0 lines, -46 lines 0 comments Download
D content/child/web_discardable_memory_impl.cc View 1 chunk +0 lines, -50 lines 0 comments Download
M content/content_child.gypi View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVector.h View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVector.cpp View 1 2 3 4 5 7 chunks +14 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/platform/PurgeableVectorTest.cpp View 1 2 3 15 chunks +37 lines, -69 lines 0 comments Download
M third_party/WebKit/Source/platform/SharedBufferTest.cpp View 1 2 3 4 2 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/RunAllTests.cpp View 1 2 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h View 4 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp View 2 chunks +0 lines, -42 lines 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 2 chunks +0 lines, -8 lines 0 comments Download
D third_party/WebKit/public/platform/WebDiscardableMemory.h View 1 chunk +0 lines, -86 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
jbroman
esprehn for content/child/ and third_party/WebKit/, danakj for base/ This seems a straightforward simplification to reduce ...
4 years, 9 months ago (2016-03-14 17:26:52 UTC) #3
danakj
base LGTM
4 years, 9 months ago (2016-03-14 18:03:34 UTC) #4
jbroman
ping esprehn?
4 years, 9 months ago (2016-03-15 20:13:12 UTC) #5
esprehn
lgtm, please be patient during perf. :) https://codereview.chromium.org/1787973002/diff/80001/third_party/WebKit/Source/platform/PurgeableVector.cpp File third_party/WebKit/Source/platform/PurgeableVector.cpp (right): https://codereview.chromium.org/1787973002/diff/80001/third_party/WebKit/Source/platform/PurgeableVector.cpp#newcode92 third_party/WebKit/Source/platform/PurgeableVector.cpp:92: std::string(utf8DumpName.data(), utf8DumpName.length()), ...
4 years, 9 months ago (2016-03-15 20:43:26 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1787973002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1787973002/100001
4 years, 9 months ago (2016-03-15 23:25:47 UTC) #9
jbroman
On 2016/03/15 at 20:43:26, esprehn wrote: > lgtm, please be patient during perf. :) Didn't ...
4 years, 9 months ago (2016-03-15 23:27:03 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1787973002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1787973002/100001
4 years, 9 months ago (2016-03-15 23:32:26 UTC) #13
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-16 01:52:17 UTC) #14
commit-bot: I haz the power
4 years, 9 months ago (2016-03-16 01:53:54 UTC) #16
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/36fc372117d5c40162dc014aaba4bbb7e3d5779a
Cr-Commit-Position: refs/heads/master@{#381378}

Powered by Google App Engine
This is Rietveld 408576698