Index: gpu/command_buffer/service/gles2_cmd_decoder.cc |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
index 081d3714b2de69cc0e5496b0e5017cb867e91ec7..c525908a1f14913df300d49dfcacb0073f1bd710 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -4748,7 +4748,8 @@ GLuint GLES2DecoderImpl::DoGetMaxValueInBufferCHROMIUM( |
error::Error GLES2DecoderImpl::ShaderSourceHelper( |
GLuint client_id, const char* data, uint32 data_size) { |
std::string str(data, data + data_size); |
- if (!StringIsValidForGLES(str.c_str())) { |
+ std::string stripped = ShaderManager::StripComments(str); |
+ if (!StringIsValidForGLES(stripped.c_str())) { |
SetGLError(GL_INVALID_VALUE, "glShaderSource: Invalid character"); |
return error::kNoError; |
} |