Revision: 18102
Author: [email protected]
Date: Wed Nov 27 13:51:50 2013 UTC
Log: Fix scanning of escape codes.
[email protected]
Review URL: https://codereview.chromium.org/90993004
http://code.google.com/p/v8/source/detail?r=18102
Modified:
/branches/experimental/parser/src/lexer/experimental-scanner.h
=======================================
--- /branches/experimental/parser/src/lexer/experimental-scanner.h Wed Nov
27 13:01:38 2013 UTC
+++ /branches/experimental/parser/src/lexer/experimental-scanner.h Wed Nov
27 13:51:50 2013 UTC
@@ -562,14 +562,14 @@
case 'r' : c = '\r'; break;
case 't' : c = '\t'; break;
case 'u' : {
- if (end > cursor + 4) return NULL;
+ ASSERT(cursor + 4 <= end);
cursor = ScanHexNumber(cursor, cursor + 4, &c);
if (cursor == NULL) return NULL;
break;
}
case 'v' : c = '\v'; break;
case 'x' : {
- if (end > cursor + 2) return NULL ;
+ ASSERT(cursor + 2 <= end);
cursor = ScanHexNumber(cursor, cursor + 2, &c);
if (cursor == NULL) return NULL;
break;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.