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

Unified Diff: gpu/command_buffer/service/common_decoder.cc

Issue 802323005: Revert of Validate Bucket data in ShaderSourceBucket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « gpu/command_buffer/service/common_decoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/common_decoder.cc
diff --git a/gpu/command_buffer/service/common_decoder.cc b/gpu/command_buffer/service/common_decoder.cc
index 9c329927286e8995b40da0b4fb5c3c8a5bd27084..86a37ba77e5fb8dd94c4c285ed0ce3351c46ac92 100644
--- a/gpu/command_buffer/service/common_decoder.cc
+++ b/gpu/command_buffer/service/common_decoder.cc
@@ -18,17 +18,12 @@
return NULL;
}
-bool CommonDecoder::Bucket::SetSize(size_t size) {
+void CommonDecoder::Bucket::SetSize(size_t size) {
if (size != size_) {
data_.reset(size ? new int8[size] : NULL);
- if (!data_.get() && (size != 0)) {
- size_ = 0;
- return false;
- }
size_ = size;
memset(data_.get(), 0, size);
}
- return true;
}
bool CommonDecoder::Bucket::SetData(
@@ -191,9 +186,7 @@
uint32 size = args.size;
Bucket* bucket = CreateBucket(bucket_id);
- if (!bucket->SetSize(size)) {
- return error::kOutOfBounds;
- }
+ bucket->SetSize(size);
return error::kNoError;
}
« no previous file with comments | « gpu/command_buffer/service/common_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698