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

Side by Side Diff: content/browser/aura/gpu_process_transport_factory.cc

Issue 23364002: asan use after free in Aura cc:TextureLayer::Update (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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 unified diff | Download patch
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/aura/gpu_process_transport_factory.h" 5 #include "content/browser/aura/gpu_process_transport_factory.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 virtual unsigned int PrepareTexture() OVERRIDE { 66 virtual unsigned int PrepareTexture() OVERRIDE {
67 return texture_id_; 67 return texture_id_;
68 } 68 }
69 69
70 virtual WebKit::WebGraphicsContext3D* HostContext3D() OVERRIDE { 70 virtual WebKit::WebGraphicsContext3D* HostContext3D() OVERRIDE {
71 return host_context_; 71 return host_context_;
72 } 72 }
73 73
74 // ImageTransportFactory overrides: 74 // ImageTransportFactory overrides:
75 virtual void OnLostResources() OVERRIDE { 75 virtual void OnLostResources() OVERRIDE {
76 DeleteTexture(); 76 DeleteTexture();
cpu_(ooo_6.6-7.5) 2013/08/21 22:50:09 I think we should not call DeleteTexture() here an
piman 2013/08/21 23:01:33 I disagree. It can cause leaks depending on the GL
77 host_context_ = NULL;
77 } 78 }
78 79
79 protected: 80 protected:
80 virtual ~OwnedTexture() { 81 virtual ~OwnedTexture() {
81 ImageTransportFactory::GetInstance()->RemoveObserver(this); 82 ImageTransportFactory::GetInstance()->RemoveObserver(this);
82 DeleteTexture(); 83 DeleteTexture();
83 } 84 }
84 85
85 protected: 86 protected:
86 void DeleteTexture() { 87 void DeleteTexture() {
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 shared_contexts_main_thread_ = NULL; 502 shared_contexts_main_thread_ = NULL;
502 503
503 scoped_ptr<GLHelper> old_helper(gl_helper_.release()); 504 scoped_ptr<GLHelper> old_helper(gl_helper_.release());
504 505
505 FOR_EACH_OBSERVER(ImageTransportFactoryObserver, 506 FOR_EACH_OBSERVER(ImageTransportFactoryObserver,
506 observer_list_, 507 observer_list_,
507 OnLostResources()); 508 OnLostResources());
508 } 509 }
509 510
510 } // namespace content 511 } // namespace content
OLDNEW
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698