Bug 130304

Summary: Remove all uses of deprecatedCharacters from JavaScriptCore
Product: WebKit Reporter: Darin Adler <darin>
Component: JavaScriptCoreAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, benjamin, cmarcelo, ggaren, kling, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 126854    
Attachments:
Description Flags
Patch
none
Patch andersca: review+

Darin Adler
Reported 2014-03-16 09:40:59 PDT
Remove all uses of deprecatedCharacters from JavaScriptCore
Attachments
Patch (27.34 KB, patch)
2014-03-16 09:52 PDT, Darin Adler
no flags
Patch (27.26 KB, patch)
2014-03-16 10:33 PDT, Darin Adler
andersca: review+
Darin Adler
Comment 1 2014-03-16 09:52:47 PDT
Anders Carlsson
Comment 2 2014-03-16 10:32:55 PDT
Comment on attachment 226842 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226842&action=review > Source/JavaScriptCore/API/JSValueRef.cpp:336 > + if (str.is8Bit()) { I think this will crash if str is a null string.
Darin Adler
Comment 3 2014-03-16 10:33:50 PDT
Darin Adler
Comment 4 2014-03-16 10:36:19 PDT
Andreas Kling
Comment 5 2014-03-16 22:43:28 PDT
Looks like this broke JSC tests on bots: 1 0x109b29a9e WTF::StringImpl::destroy(WTF::StringImpl*) 2 0x10998ea0c JSStringRelease 3 0x10999fa31 -[JSValue valueForProperty:] 4 0x109725741 __testObjectiveCAPI_block_invoke354 5 0x10994b45d -[JSContext(Internal) valueFromNotifyException:] 6 0x10994abba -[JSContext evaluateScript:withSourceURL:] 7 0x10971ebe2 testObjectiveCAPI 8 0x10971651c main 9 0x7fff8b5645fd start 10 0x1
Andreas Kling
Comment 6 2014-03-16 23:18:28 PDT
(In reply to comment #5) > Looks like this broke JSC tests on bots: > > 1 0x109b29a9e WTF::StringImpl::destroy(WTF::StringImpl*) > 2 0x10998ea0c JSStringRelease > 3 0x10999fa31 -[JSValue valueForProperty:] > 4 0x109725741 __testObjectiveCAPI_block_invoke354 > 5 0x10994b45d -[JSContext(Internal) valueFromNotifyException:] > 6 0x10994abba -[JSContext evaluateScript:withSourceURL:] > 7 0x10971ebe2 testObjectiveCAPI > 8 0x10971651c main > 9 0x7fff8b5645fd start > 10 0x1 Fixed this in <http://trac.webkit.org/r165719>. Not sure why webkit-patch added an r=andersca.
Darin Adler
Comment 7 2014-03-17 00:24:03 PDT
Thanks Andreas, for fixing my mistake. Maybe someone who understands the rationale should add a comment explaining why we go out of our way to make a new string instead of using the existing one.
Note You need to log in before you can comment on or make changes to this bug.