Changeset 71930 in webkit
- Timestamp:
- Nov 12, 2010 10:39:53 AM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r71919 r71930 1 2010-11-12 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 ASSERTION when converting some WKStringRefs returned from willSubmitForm to CFStringRef 6 <rdar://problem/8662180> 7 https://bugs.webkit.org/show_bug.cgi?id=49454 8 9 Enforce the invariant that a WebString never contains a null WTF::String at a 10 lower level, in the WebString constructor, instead of relying on the callers of 11 WebString::create to do it. 12 13 * Shared/API/c/WKSharedAPICast.h: 14 (WebKit::toAPI): 15 (WebKit::toCopiedAPI): Remove null string check... 16 17 * Shared/WebString.h: 18 (WebKit::WebString::WebString): ... and move it to the constructor. 19 20 * Shared/API/c/WKURL.cpp: 21 (WKURLCopyString): Use toCopiedAPI() instead of calling WebString directly 22 to match other similar uses. 23 1 24 2010-11-12 Andreas Kling <kling@webkit.org> 2 25 -
trunk/WebKit2/Shared/API/c/WKSharedAPICast.h
r71790 r71930 116 116 inline ProxyingRefPtr<WebString> toAPI(StringImpl* string) 117 117 { 118 StringImpl* impl = string ? string : StringImpl::empty(); 119 return ProxyingRefPtr<WebString>(WebString::create(String(impl))); 118 return ProxyingRefPtr<WebString>(WebString::create(string)); 120 119 } 121 120 122 121 inline WKStringRef toCopiedAPI(const String& string) 123 122 { 124 StringImpl* impl = string.impl() ? string.impl() : StringImpl::empty(); 125 RefPtr<WebString> webString = WebString::create(String(impl)); 123 RefPtr<WebString> webString = WebString::create(string); 126 124 return toAPI(webString.release().releaseRef()); 127 125 } -
trunk/WebKit2/Shared/API/c/WKURL.cpp
r70723 r71930 42 42 WKStringRef WKURLCopyString(WKURLRef url) 43 43 { 44 return to API(WebString::create(toImpl(url)->string()).leakRef());44 return toCopiedAPI(toImpl(url)->string()); 45 45 } 46 46 -
trunk/WebKit2/Shared/WebString.h
r68961 r71930 82 82 private: 83 83 WebString(const String& string) 84 : m_string( string)84 : m_string(!string.impl() ? String(StringImpl::empty()) : string) 85 85 { 86 86 }
Note: See TracChangeset
for help on using the changeset viewer.