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

Issue 2716553004: Add temporary reference ownership to SurfaceManager. (Closed)

Created:
3 years, 10 months ago by kylechar
Modified:
3 years, 9 months ago
Reviewers:
Fady Samuel, jbauman
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add temporary reference ownership to SurfaceManager. We normally remove a temporary reference when the first surface reference is added for a surface. If something happens to the parent client, say it crashes, it may never add a surface reference. We would be left with dangling temporary references and memory wouldn't get freed. Start adding a system to SurfaceManager where each temporary reference is assigned an owner by a trusted process. This assignment will happen from the mus-ws process (or browser process). The owner is the FrameSinkId that is expected to embed the new Surface. If the owner FrameSinkId is invalidated, all temporary references it owns are removed and the Surfaces can cleaned up. The mus-ws and IPC parts of this will be added in a followup CL. BUG=683738 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2716553004 Cr-Commit-Position: refs/heads/master@{#453599} Committed: https://chromium.googlesource.com/chromium/src/+/803cb96d3089cc214ee46062cf3759a13646b172

Patch Set 1 #

Patch Set 2 : Cleanup. #

Total comments: 20

Patch Set 3 : Rebase on new CLs. #

Patch Set 4 : Fix comments. #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -3 lines) Patch
M cc/surfaces/surface_manager.h View 1 2 3 chunks +16 lines, -3 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 3 4 2 chunks +35 lines, -0 lines 0 comments Download
M cc/surfaces/surface_manager_ref_unittest.cc View 1 2 3 1 chunk +78 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 22 (11 generated)
kylechar
+fsamuel for overall review, will loop in OWNERS if we're on the same page.
3 years, 10 months ago (2017-02-23 19:25:00 UTC) #3
Fady Samuel
This CL contains a bunch of subtle code as well as a bunch of cleanup/refactoring. ...
3 years, 10 months ago (2017-02-24 18:10:15 UTC) #4
Fady Samuel
https://codereview.chromium.org/2716553004/diff/20001/cc/surfaces/surface_manager_ref_unittest.cc File cc/surfaces/surface_manager_ref_unittest.cc (right): https://codereview.chromium.org/2716553004/diff/20001/cc/surfaces/surface_manager_ref_unittest.cc#newcode411 cc/surfaces/surface_manager_ref_unittest.cc:411: TEST_F(SurfaceManagerRefTest, TemporaryReferenceNotGarbageCollected) { Top level comment about what the ...
3 years, 10 months ago (2017-02-24 19:08:11 UTC) #5
kylechar
I've addressed a couple of comments and split this CL. I'll address the comments left ...
3 years, 10 months ago (2017-02-24 19:28:01 UTC) #6
kylechar
https://codereview.chromium.org/2716553004/diff/20001/cc/surfaces/surface_manager.cc File cc/surfaces/surface_manager.cc (right): https://codereview.chromium.org/2716553004/diff/20001/cc/surfaces/surface_manager.cc#newcode75 cc/surfaces/surface_manager.cc:75: // Temporary references will have an asterix in front ...
3 years, 10 months ago (2017-02-24 19:57:30 UTC) #7
kylechar
The refactor parts have been split and this has been rebased on that change. PTAL.
3 years, 9 months ago (2017-02-27 15:26:16 UTC) #9
Fady Samuel
lgtm
3 years, 9 months ago (2017-02-27 21:01:17 UTC) #10
kylechar
+jbauman for OWNERS
3 years, 9 months ago (2017-02-27 21:02:09 UTC) #12
jbauman
lgtm
3 years, 9 months ago (2017-02-28 01:50:11 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2716553004/70001
3 years, 9 months ago (2017-02-28 14:51:08 UTC) #19
commit-bot: I haz the power
3 years, 9 months ago (2017-02-28 14:56:26 UTC) #22
Message was sent while issue was closed.
Committed patchset #5 (id:70001) as
https://chromium.googlesource.com/chromium/src/+/803cb96d3089cc214ee46062cf37...

Powered by Google App Engine
This is Rietveld 408576698