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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 1406993003: aura: Handle released widget when GPU channel gets established (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 2 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/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index b7ed84406a3a9d635384ddda1e3765b703764d6b..cf7e8a0ae0569a2f3a012fb2b3e2b0a0ca52c840 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -230,7 +230,14 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
int num_attempts) {
if (!compositor)
return;
- PerCompositorData* data = per_compositor_data_[compositor.get()];
+
+ // The widget might have been released in the meantime.
+ PerCompositorDataMap::iterator it =
+ per_compositor_data_.find(compositor.get());
+ if (it == per_compositor_data_.end())
+ return;
+
+ PerCompositorData* data = it->second;
DCHECK(data);
if (num_attempts > kNumRetriesBeforeSoftwareFallback) {
« 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