summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 23:29:34 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 23:29:34 +0000
commitf826b5fd35ee9b020136cc42c9e264e0ced9bb85 (patch)
treef1ce8e817610242acd3e7cb9f91ee1567d2325fa
parent7e6a7b05852461dc39aa1a3a254f5d0757ca8cdc (diff)
downloadchromium_src-f826b5fd35ee9b020136cc42c9e264e0ced9bb85.zip
chromium_src-f826b5fd35ee9b020136cc42c9e264e0ced9bb85.tar.gz
chromium_src-f826b5fd35ee9b020136cc42c9e264e0ced9bb85.tar.bz2
Don't keep the OutputSurfaceClient* when BindToClient() fails.
This hits a NOTREACHED() at shutdown, ~BrowserCompositorOutputSurface() tries to remove a surface_id_ that wasn't added to the output_surface_proxy_. BUG=None Review URL: https://chromiumcodereview.appspot.com/16020002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202224 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/output/output_surface.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/cc/output/output_surface.cc b/cc/output/output_surface.cc
index b471a08..ffc0b2a 100644
--- a/cc/output/output_surface.cc
+++ b/cc/output/output_surface.cc
@@ -75,12 +75,11 @@ bool OutputSurface::ForcedDrawToSoftwareDevice() const {
bool OutputSurface::BindToClient(
cc::OutputSurfaceClient* client) {
DCHECK(client);
+ if (context3d_ && !context3d_->makeContextCurrent())
+ return false;
client_ = client;
if (!context3d_)
return true;
- if (!context3d_->makeContextCurrent())
- return false;
-
string extensions_string = UTF16ToASCII(context3d_->getString(GL_EXTENSIONS));
vector<string> extensions_list;
base::SplitString(extensions_string, ' ', &extensions_list);