WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
74564
Mac WebScriptDebugger crashes beneath sourceParsed()
https://bugs.webkit.org/show_bug.cgi?id=74564
Summary
Mac WebScriptDebugger crashes beneath sourceParsed()
Michael Saboff
Reported
2011-12-14 16:57:39 PST
The code in Source/WebKit/Mac/WebView/WebScriptDebugger.mm at line 65 is crashing due to the cast of a StringImpl* to a unichar*. 61 static NSString *toNSString(SourceProvider* s) 62 { 63 if (!s->length()) 64 return nil; 65 return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s->data()) length:s->length()]; 66 } The code needs to be changed to return [NSString stringWithCharacters:reinterpret_cast<const unichar*>(s->data()->characters()) length:s->length()]; To actually access the characters. In radar as <
rdar://problem/10521033
>.
Attachments
Patch
(1.30 KB, patch)
2011-12-14 17:00 PST
,
Michael Saboff
barraclough
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Saboff
Comment 1
2011-12-14 17:00:31 PST
Created
attachment 119337
[details]
Patch
Gavin Barraclough
Comment 2
2011-12-14 17:04:16 PST
Comment on
attachment 119337
[details]
Patch please give static_cast a go, r+ either way.
Darin Adler
Comment 3
2011-12-14 17:08:19 PST
Comment on
attachment 119337
[details]
Patch Might also want to try without a cast at all.
Michael Saboff
Comment 4
2011-12-14 17:34:58 PST
Committed
r102856
: <
http://trac.webkit.org/changeset/102856
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug