mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-02 12:56:05 +00:00
JSStringCreateWithUTF8CString and JSStringIsEqualToUTF8CString take a null UTF-8 pointer as a null string, and JSStringCreateWithCharacters returns a null string for null characters of any length, as WebKit's JSStringRef.cpp and WTF's String constructors do. A length above WebKit's 2147483635-unit limit and a null handle given to retain, release or the maximum-size query throw std exceptions where JavaScriptCore crashes. The reference count is a wrapping 32-bit counter and the maximum UTF-8 size is computed in 32 bits, as in WTF.