Reviewers: rossberg,
Message:
PTAL.
Description:
Fix string whitespace trimming of byte order marks.
[email protected]
TEST=test262
Please review this at http://codereview.chromium.org/8195006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/runtime.cc
M test/test262/test262.status
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
995b1cccf09e6570652f94eda27883e92dbf6ba1..f47e54aba935ee56446cb68c417c9c7ae7ac6a54
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6114,7 +6114,7 @@ RUNTIME_FUNCTION(MaybeObject*,
Runtime_StringToUpperCase) {
static inline bool IsTrimWhiteSpace(unibrow::uchar c) {
- return unibrow::WhiteSpace::Is(c) || c == 0x200b;
+ return unibrow::WhiteSpace::Is(c) || c == 0x200b || c == 0xfeff;
}
Index: test/test262/test262.status
diff --git a/test/test262/test262.status b/test/test262/test262.status
index
a7b59696ffff4c65120e11874f119d0a84f107dc..3f5fd5ad0bec7ee1dfa7dea1a5e1b358661455fc
100644
--- a/test/test262/test262.status
+++ b/test/test262/test262.status
@@ -1278,28 +1278,6 @@ S15.4.4.3_A2_T1: FAIL_OK
# Bug? Array.prototype.reduceRight - modifications to length will change
number
# of iterations
15.4.4.22-9-9: FAIL
-# Bug? String.prototype.trim - 'S' is a string with all WhiteSpace
-15.5.4.20-3-2: FAIL
-# Bug? String.prototype.trim - 'S' is a string with all union of
WhiteSpace and
-# LineTerminator
-15.5.4.20-3-3: FAIL
-# Bug? String.prototype.trim - 'S' is a string start with union of all
-# LineTerminator and all WhiteSpace
-15.5.4.20-3-4: FAIL
-# Bug? String.prototype.trim - 'S' is a string end with union of all
-# LineTerminator and all WhiteSpace
-15.5.4.20-3-5: FAIL
-# Bug? String.prototype.trim - 'S' is a string start with union of all
-# LineTerminator and all WhiteSpace and end with union of all
-# LineTerminator and all WhiteSpace
-15.5.4.20-3-6: FAIL
-# Bug? String.prototype.trim handles whitepace and lineterminators
(\\uFEFFabc)
-15.5.4.20-4-10: FAIL
-# Bug? String.prototype.trim handles whitepace and lineterminators
(abc\\uFEFF)
-15.5.4.20-4-18: FAIL
-# Bug? String.prototype.trim handles whitepace and lineterminators
-# (\\uFEFF\\uFEFF)
-15.5.4.20-4-34: FAIL
# Bug? Date.prototype.toISOString - RangeError is thrown when value of
date is
# Date(1970, 0, -99999999, 0, 0, 0, -1), the time zone is UTC(0)
15.9.5.43-0-8: FAIL
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev