Changeset 35623 in webkit
- Timestamp:
- Aug 7, 2008 5:09:19 AM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r35618 r35623 1 2008-08-07 Alp Toker <alp@nuanti.com> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=20313 6 Add null check in String::fromUTF8() 7 8 Make String::fromUTF8() consistent with other constructors by 9 returning a null String when the input is null instead of crashing. 10 11 * platform/text/String.cpp: 12 (WebCore::String::fromUTF8): 13 1 14 2008-08-06 Kevin Ollivier <kevino@theolliviers.com> 2 15 -
trunk/WebCore/platform/text/String.cpp
r34607 r35623 583 583 String String::fromUTF8(const char* string, size_t size) 584 584 { 585 if (!string) 586 return String(); 585 587 return UTF8Encoding().decode(string, size); 586 588 } … … 588 590 String String::fromUTF8(const char* string) 589 591 { 592 if (!string) 593 return String(); 590 594 return UTF8Encoding().decode(string, strlen(string)); 591 595 }
Note: See TracChangeset
for help on using the changeset viewer.