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

Unified Diff: src/scanner.cc

Issue 902703002: templates: Don't check IsLineTerminator() if character is negative (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | test/mjsunit/regress/regress-455212.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index ea8586ed263b7b8da4fffc6a7287c8282859be61..de1b8e8b7202d211b297e8ca5737fb8f411299ed 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -843,7 +843,7 @@ Token::Value Scanner::ScanTemplateSpan() {
ReduceRawLiteralLength(2);
break;
} else if (c == '\\') {
- if (unicode_cache_->IsLineTerminator(c0_)) {
+ if (c0_ > 0 && unicode_cache_->IsLineTerminator(c0_)) {
arv (Not doing code reviews) 2015/02/04 20:10:49 This seems fine. One thing we can do is to add a
// The TV of LineContinuation :: \ LineTerminatorSequence is the empty
// code unit sequence.
uc32 lastChar = c0_;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-455212.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698