summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authornfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 06:33:26 +0000
committernfullagar@google.com <nfullagar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-30 06:33:26 +0000
commita0cfffcdb37a626df7587532a64936a71bcbe2de (patch)
tree40de0ead795f5183397b05c06894b8ac3444f8e0 /content
parent76ac8b21ecb8d074af722f92b0739a88fbab63b1 (diff)
downloadchromium_src-a0cfffcdb37a626df7587532a64936a71bcbe2de.zip
chromium_src-a0cfffcdb37a626df7587532a64936a71bcbe2de.tar.gz
chromium_src-a0cfffcdb37a626df7587532a64936a71bcbe2de.tar.bz2
Trusted proxy side checks on GetRingBuffer()
BUG=http://code.google.com/p/chromium/issues/detail?id=105641 TEST=none Review URL: http://codereview.chromium.org/8725017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/renderer/gpu/command_buffer_proxy.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/content/renderer/gpu/command_buffer_proxy.cc b/content/renderer/gpu/command_buffer_proxy.cc
index c4562b8..86420ae 100644
--- a/content/renderer/gpu/command_buffer_proxy.cc
+++ b/content/renderer/gpu/command_buffer_proxy.cc
@@ -158,9 +158,15 @@ Buffer CommandBufferProxy::GetRingBuffer() {
DCHECK(ring_buffer_.get());
// Return locally cached ring buffer.
Buffer buffer;
- buffer.ptr = ring_buffer_->memory();
- buffer.size = num_entries_ * sizeof(gpu::CommandBufferEntry);
- buffer.shared_memory = ring_buffer_.get();
+ if (ring_buffer_.get()) {
+ buffer.ptr = ring_buffer_->memory();
+ buffer.size = num_entries_ * sizeof(gpu::CommandBufferEntry);
+ buffer.shared_memory = ring_buffer_.get();
+ } else {
+ buffer.ptr = NULL;
+ buffer.size = 0;
+ buffer.shared_memory = NULL;
+ }
return buffer;
}