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

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

Issue 2220933002: Empty program info log should not be a '\0' string in WebGL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace length with empty Created 4 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 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: gpu/command_buffer/service/program_manager.cc
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc
index 2b3757b7cc09dd9f17ca392ef1fc691fa5cc17ef..b00a6cefa84fdf50a7e10b2deba4fc2b65a3699b 100644
--- a/gpu/command_buffer/service/program_manager.cc
+++ b/gpu/command_buffer/service/program_manager.cc
@@ -482,7 +482,7 @@ void Program::UpdateLogInfo() {
GLint max_len = 0;
glGetProgramiv(service_id_, GL_INFO_LOG_LENGTH, &max_len);
if (max_len == 0) {
- set_log_info(NULL);
+ set_log_info(nullptr);
return;
}
std::unique_ptr<char[]> temp(new char[max_len]);
@@ -491,7 +491,8 @@ void Program::UpdateLogInfo() {
DCHECK(max_len == 0 || len < max_len);
DCHECK(len == 0 || temp[len] == '\0');
std::string log(temp.get(), len);
- set_log_info(ProcessLogInfo(log).c_str());
+ log = ProcessLogInfo(log);
+ set_log_info(log.empty() ? nullptr : log.c_str());
}
void Program::ClearUniforms(std::vector<uint8_t>* zero_buffer) {
« 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