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

Unified Diff: cc/surfaces/surface_id_allocator.h

Issue 2087383002: Fix destruction order between SurfaceManger and OffscreenCanvasSurfaceImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix SurfaceIdAllocator's destructor Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface_id_allocator.h
diff --git a/cc/surfaces/surface_id_allocator.h b/cc/surfaces/surface_id_allocator.h
index d1e15fbbc492a890957a84934928a38e1d391e9b..79d148231a443d503e421e17afb3e8c1b2bbb0e3 100644
--- a/cc/surfaces/surface_id_allocator.h
+++ b/cc/surfaces/surface_id_allocator.h
@@ -35,6 +35,10 @@ class CC_SURFACES_EXPORT SurfaceIdAllocator {
uint32_t id_namespace() const { return id_namespace_; }
+ // SurfaceIdAllocator's owner can call this when it find out that
+ // SurfaceManager is no longer alive during destruction.
+ void didDestroySurfaceManager() { manager_ = nullptr; }
xlai (Olivia) 2016/06/23 14:49:39 Rename this based on feedback from junov@ on anoth
jbauman 2016/06/23 19:46:57 Same here.
+
private:
const uint32_t id_namespace_;
uint32_t next_id_;

Powered by Google App Engine
This is Rietveld 408576698