Created attachment 354910[details]
Archive of layout-test-results from ews101 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 354911[details]
Archive of layout-test-results from ews104 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Created attachment 354913[details]
Archive of layout-test-results from ews114 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 354915[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 355030[details]
Archive of layout-test-results from ews102 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 355032[details]
Archive of layout-test-results from ews104 for mac-sierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Created attachment 355033[details]
Archive of layout-test-results from ews112 for mac-sierra
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 355034[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 355038[details]
Archive of layout-test-results from ews126 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
(In reply to Ross Kirsling from comment #31)
> Informal r+.
>
> This seems quite straightforward (and even matches closely with the
> SpiderMonkey implementation).
Thanks ;)
Comment on attachment 355194[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=355194&action=review> Source/WTF/wtf/text/StringBuilderJSON.cpp:85
> + uint8_t upper = static_cast<uint32_t>(character) >> 8;
I don’t understand what value the static_cast<uint32_t> has here. It seems the code would do the right thing without that.
> Source/WTF/wtf/text/StringBuilderJSON.cpp:86
> + uint8_t lower = static_cast<uint8_t>(character);
I don’t understand what value the static_cast<uint8_t> has here. It seems the code would do the right thing without that.
Comment on attachment 355194[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=355194&action=review>> Source/WTF/wtf/text/StringBuilderJSON.cpp:84
>> + if (U16_IS_SURROGATE_TRAIL(character) || next == end || !U16_IS_SURROGATE_TRAIL(*next)) {
>
> Oops, this is wrong! Details to come.
This needs to use U16_IS_TRAIL, not U16_IS_SURROGATE_TRAIL, on *next. Test cases would be string where the last two characters are:
1) A surrogate head.
2) A non-surrogate character with the bit 0x400 set.
That case would work incorrectly.
I also think I would write it more like this to make the logic clearer:
bool isValidSurrogatePair = U16_IS_SURROGATE_HEAD(character) && next != end && U16_IS_TRAIL(*next);
if (!isValidSurrogatePair)
(In reply to Darin Adler from comment #37)
> Comment on attachment 355194[details]
> Patch
>
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=355194&action=review
>
> >> Source/WTF/wtf/text/StringBuilderJSON.cpp:84
> >> + if (U16_IS_SURROGATE_TRAIL(character) || next == end || !U16_IS_SURROGATE_TRAIL(*next)) {
> >
> > Oops, this is wrong! Details to come.
>
> This needs to use U16_IS_TRAIL, not U16_IS_SURROGATE_TRAIL, on *next. Test
> cases would be string where the last two characters are:
>
> 1) A surrogate head.
> 2) A non-surrogate character with the bit 0x400 set.
>
> That case would work incorrectly.
>
> I also think I would write it more like this to make the logic clearer:
>
> bool isValidSurrogatePair = U16_IS_SURROGATE_HEAD(character) && next !=
> end && U16_IS_TRAIL(*next);
> if (!isValidSurrogatePair)
Oops, super nice catch! Right. I'll fix this and update the patch soon.
2018-11-15 03:04 PST, Yusuke Suzuki
2018-11-15 03:07 PST, Yusuke Suzuki
2018-11-15 03:48 PST, EWS Watchlist
2018-11-15 03:57 PST, EWS Watchlist
2018-11-15 05:03 PST, EWS Watchlist
2018-11-15 05:07 PST, EWS Watchlist
2018-11-15 23:46 PST, Yusuke Suzuki
2018-11-16 00:49 PST, EWS Watchlist
2018-11-16 00:57 PST, EWS Watchlist
2018-11-16 01:39 PST, EWS Watchlist
2018-11-16 01:50 PST, EWS Watchlist
2018-11-16 03:47 PST, EWS Watchlist
2018-11-17 01:53 PST, Yusuke Suzuki
2018-11-17 01:56 PST, Yusuke Suzuki
2018-11-17 05:52 PST, Yusuke Suzuki
2018-12-20 10:09 PST, Yusuke Suzuki