Commit d9440a3f authored by Jonah Ryan-Davis's avatar Jonah Ryan-Davis Committed by Commit Bot

Fix GLSL compilation with non-ascii characters

WebGL call to glShaderSource failing when a comment after a
preprocessor directive contains any non-ascii characters.

Bug: 940865
Change-Id: I57fb201ec88d73093776c7d200d62cc9e7ce2b41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846073Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Cr-Commit-Position: refs/heads/master@{#703856}
parent 0ddd3db1
......@@ -445,6 +445,7 @@ void StripComments::Process(UChar c) {
break;
case kMiddleOfLine:
case kInPreprocessorDirective:
if (c == '/' && Peek(temp)) {
if (temp == '/') {
parse_state_ = kInSingleLineComment;
......@@ -468,14 +469,6 @@ void StripComments::Process(UChar c) {
Emit(c);
break;
case kInPreprocessorDirective:
// No matter what the character is, just pass it
// through. Do not parse comments in this state. This
// might not be the right thing to do long term, but it
// should handle the #error preprocessor directive.
Emit(c);
break;
case kInSingleLineComment:
// Line-continuation characters are processed before comment processing.
// Advance string if a new line character is immediately behind
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment