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

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 284003002: NULL out pending_requests_ when GPU channel fails to be created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/gpu/browser_gpu_channel_host_factory.cc
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index 715eb204546209565072ed8e460474547beaa640..9a0013a6d27b65b3882f898b647a7f83bc8f4f83 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -358,14 +358,15 @@ GpuChannelHost* BrowserGpuChannelHostFactory::GetGpuChannel() {
void BrowserGpuChannelHostFactory::GpuChannelEstablished() {
DCHECK(IsMainThread());
DCHECK(pending_request_);
- if (pending_request_->channel_handle().name.empty())
- return;
-
- GetContentClient()->SetGpuInfo(pending_request_->gpu_info());
- gpu_channel_ = GpuChannelHost::Create(this,
- pending_request_->gpu_info(),
- pending_request_->channel_handle(),
- shutdown_event_.get());
+ if (pending_request_->channel_handle().name.empty()) {
+ DCHECK(!gpu_channel_);
+ } else {
+ GetContentClient()->SetGpuInfo(pending_request_->gpu_info());
+ gpu_channel_ = GpuChannelHost::Create(this,
+ pending_request_->gpu_info(),
+ pending_request_->channel_handle(),
+ shutdown_event_.get());
+ }
gpu_host_id_ = pending_request_->gpu_host_id();
pending_request_ = NULL;
« 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