Bug 142350

Summary: Regression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, darin, dpino, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 131704    
Attachments:
Description Flags
Patch
none
Patch
none
Patch benjamin: review+

Description Chris Dumez 2015-03-05 11:18:35 PST
Regression(r173761): ASSERTION FAILED: !is8Bit() in StringImpl::characters16():

ASSERTION FAILED: !is8Bit()
/Volumes/Data/cdumez/WebKit/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/text/StringImpl.h(420) : const UChar *WTF::StringImpl::characters16() const
1   0x10bf1a610 WTFCrash
2   0x10b583e0a WTF::StringImpl::characters16() const
3   0x10bf61038 WTF::equalInner(WTF::StringImpl&, unsigned int, WTF::StringImpl&, bool)
4   0x10bf60f12 WTF::StringImpl::startsWith(WTF::StringImpl&, unsigned int, bool) const
5   0x10be5eec9 WTF::String::startsWith(WTF::String&, unsigned int, bool) const
6   0x10be59dc3 JSC::stringProtoFuncStartsWith(JSC::ExecState*)


In equalInner(), it is assumed that if stringImpl is 16-bit, then matchString is 16-bit too. However, this does not seem to be the case.
Comment 1 Chris Dumez 2015-03-05 14:40:33 PST
Created attachment 248003 [details]
Patch
Comment 2 Michael Saboff 2015-03-05 14:47:14 PST
Comment on attachment 248003 [details]
Patch

r=me
Comment 3 Benjamin Poulain 2015-03-05 14:49:13 PST
Comment on attachment 248003 [details]
Patch

You should have a JSC test too.
Comment 4 Chris Dumez 2015-03-05 15:05:24 PST
Created attachment 248005 [details]
Patch
Comment 5 Chris Dumez 2015-03-05 15:05:38 PST
(In reply to comment #3)
> Comment on attachment 248003 [details]
> Patch
> 
> You should have a JSC test too.

Done.
Comment 6 Benjamin Poulain 2015-03-05 15:08:48 PST
Comment on attachment 248005 [details]
Patch

You forgot to pass the index. You can keep those but you need moooooooarr
Comment 7 Chris Dumez 2015-03-05 15:12:04 PST
Created attachment 248008 [details]
Patch
Comment 8 Benjamin Poulain 2015-03-05 15:35:18 PST
Committed r181105: <http://trac.webkit.org/changeset/181105>