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

Unified Diff: content/browser/renderer_host/offscreen_canvas_surface_impl.cc

Issue 2102973005: Fix Crash on destructor of OffscreenCanvasSurfaceImpl during ConnectionError (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/offscreen_canvas_surface_impl.cc
diff --git a/content/browser/renderer_host/offscreen_canvas_surface_impl.cc b/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
index b9ada9498f928bc03d286242974c20c0c1070e7a..e6b85f59a9fbdc0e0126b1cae964f6f058965466 100644
--- a/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
+++ b/content/browser/renderer_host/offscreen_canvas_surface_impl.cc
@@ -28,8 +28,10 @@ OffscreenCanvasSurfaceImpl::~OffscreenCanvasSurfaceImpl() {
if (!GetSurfaceManager()) {
// Inform both members that SurfaceManager's no longer alive to
// avoid their destruction errors.
- surface_factory_->didDestroySurfaceManager();
- id_allocator_->didDestroySurfaceManager();
+ if (surface_factory_)
+ surface_factory_->didDestroySurfaceManager();
+ if (id_allocator_)
+ id_allocator_->didDestroySurfaceManager();
}
surface_factory_->Destroy(surface_id_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698