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

Unified Diff: src/scanner-base.h

Issue 7677012: Make scanner handle invalid unicode escapes in identifiers correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Fixed bug, updated sputnik expectations. Created 9 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 | src/scanner-base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner-base.h
diff --git a/src/scanner-base.h b/src/scanner-base.h
index 3e1772a3d237f1cd4a03f9c3757e56b45afafdd6..a7062a34afcf3a540b6baac54abfbbad647c6bf3 100644
--- a/src/scanner-base.h
+++ b/src/scanner-base.h
@@ -419,7 +419,7 @@ class Scanner {
}
}
- uc32 ScanHexEscape(uc32 c, int length);
+ uc32 ScanHexNumber(int expected_length);
// Return the current source position.
int source_pos() {
@@ -537,6 +537,10 @@ class JavaScriptScanner : public Scanner {
// Decodes a unicode escape-sequence which is part of an identifier.
// If the escape sequence cannot be decoded the result is kBadChar.
uc32 ScanIdentifierUnicodeEscape();
+ // Recognizes a uniocde escape-sequence and adds its characters,
+ // uninterpreted, to the current literal. Used for parsing RegExp
+ // flags.
+ bool ScanLiteralUnicodeEscape();
// Start position of the octal literal last scanned.
Location octal_pos_;
« no previous file with comments | « no previous file | src/scanner-base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698