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

Unified Diff: components/exo/buffer.cc

Issue 1687733002: exo: Fix null dereference in Buffer::ProduceTextureMailbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: components/exo/buffer.cc
diff --git a/components/exo/buffer.cc b/components/exo/buffer.cc
index 1bb5b26fff20d16bc46621bf29c42ebda89bf1f4..cf25844fb768eae638c9a6a70f7a689928f8f886 100644
--- a/components/exo/buffer.cc
+++ b/components/exo/buffer.cc
@@ -349,10 +349,13 @@ scoped_ptr<cc::SingleReleaseCallback> Buffer::ProduceTextureMailbox(
if (!texture_)
texture_ = make_scoped_ptr(new Texture(context_provider.get()));
+ // Copy the contents of |contents_texture| to |texture| and produce a
+ // texture mailbox from the result in |texture|.
+ Texture* contents_texture = contents_texture_.get();
Texture* texture = texture_.get();
// The contents texture will be released when copy has completed.
- gpu::SyncToken sync_token = contents_texture_->CopyTexImage(
+ gpu::SyncToken sync_token = contents_texture->CopyTexImage(
texture, base::Bind(&Buffer::ReleaseContentsTexture, AsWeakPtr(),
base::Passed(&contents_texture_)));
*texture_mailbox = cc::TextureMailbox(
« 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