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

Issue 2087383002: Fix destruction order between SurfaceManger and OffscreenCanvasSurfaceImpl (Closed)

Created:
4 years, 6 months ago by xlai (Olivia)
Modified:
4 years, 6 months ago
Reviewers:
Justin Novosad, jbauman
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix destruction order between SurfaceManger and OffscreenCanvasSurfaceImpl In a whole chain of objects tear down during a page closure, SurfaceManager is unexpectedly marked to be deleted before OffscreenCanvasSurfaceImpl is torn down. But OffscreenCanvasSurfaceImpl's two members still rely on manager_ in their destructors. This CL makes sure that before OffscreenCanvasSurfaceImpl is torn down, it checks whether SurfaceManager is alive and informs its two members (SurfaceIdAllocator and SurfaceFactory) about this. TBR=jbauman@chromium.org BUG=621849 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/9eb60ebf171a8fc0ba919d65c72661a13960f5b6 Cr-Commit-Position: refs/heads/master@{#401685}

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix SurfaceIdAllocator's destructor #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -5 lines) Patch
M cc/surfaces/surface_factory.h View 1 1 chunk +4 lines, -0 lines 2 comments Download
M cc/surfaces/surface_factory.cc View 1 2 chunks +6 lines, -3 lines 0 comments Download
M cc/surfaces/surface_id_allocator.h View 1 1 chunk +4 lines, -0 lines 2 comments Download
M content/browser/compositor/surface_utils.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_surface_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_surface_impl.cc View 1 1 chunk +9 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (10 generated)
Justin Novosad
https://codereview.chromium.org/2087383002/diff/1/cc/surfaces/surface_factory.cc File cc/surfaces/surface_factory.cc (right): https://codereview.chromium.org/2087383002/diff/1/cc/surfaces/surface_factory.cc#newcode65 cc/surfaces/surface_factory.cc:65: Surface* old_surface = manager_->GetSurfaceForId(old_id); Do you need a null ...
4 years, 6 months ago (2016-06-22 20:47:09 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2087383002/20001
4 years, 6 months ago (2016-06-23 14:49:08 UTC) #7
xlai (Olivia)
I now know what I miss yesterday---The SurfaceIdAllocator's destructor needs to be fixed too. This ...
4 years, 6 months ago (2016-06-23 14:49:39 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-23 16:17:19 UTC) #10
Justin Novosad
non-owner lgtm
4 years, 6 months ago (2016-06-23 19:25:22 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2087383002/20001
4 years, 6 months ago (2016-06-23 19:32:05 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-23 19:37:38 UTC) #16
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/9eb60ebf171a8fc0ba919d65c72661a13960f5b6 Cr-Commit-Position: refs/heads/master@{#401685}
4 years, 6 months ago (2016-06-23 19:38:50 UTC) #18
jbauman
https://codereview.chromium.org/2087383002/diff/20001/cc/surfaces/surface_factory.h File cc/surfaces/surface_factory.h (right): https://codereview.chromium.org/2087383002/diff/20001/cc/surfaces/surface_factory.h#newcode88 cc/surfaces/surface_factory.h:88: void didDestroySurfaceManager() { manager_ = nullptr; } This should ...
4 years, 6 months ago (2016-06-23 19:46:59 UTC) #19
xlai (Olivia)
4 years, 6 months ago (2016-06-23 20:09:28 UTC) #20
Message was sent while issue was closed.
https://codereview.chromium.org/2087383002/diff/20001/cc/surfaces/surface_fac...
File cc/surfaces/surface_factory.h (right):

https://codereview.chromium.org/2087383002/diff/20001/cc/surfaces/surface_fac...
cc/surfaces/surface_factory.h:88: void didDestroySurfaceManager() { manager_ =
nullptr; }
On 2016/06/23 19:46:57, jbauman wrote:
> This should be called DidDestroySurfaceManager in chromium style.

Sorry I just landed the patch after being pushed to fix beta-blocker asap. I'll
follow up with a patch (if this one is not reverted) to fix style here and some
other places. 
Actually, I'm thinking probably "did_destroy_surface_manager()" may be better
because according to Google C++ guide it says cheap function like this may use
this style.

Powered by Google App Engine
This is Rietveld 408576698