Commit f05da8ee authored by aroben@apple.com's avatar aroben@apple.com

Fix an assertion failure when Safari loads an error page

        Reviewed by Alexey Proskuryakov.

        * WebFrame.cpp:
        (WebFrame::loadData): Use the two-argument version of KURL and
        MarshallingHelpers::BSTRToKURL, for reasons mentioned in r40248.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 56b2d488
2009-01-26 Adam Roben <aroben@apple.com>
Fix an assertion failure when Safari loads an error page
Reviewed by Alexey Proskuryakov.
* WebFrame.cpp:
(WebFrame::loadData): Use the two-argument version of KURL and
MarshallingHelpers::BSTRToKURL, for reasons mentioned in r40248.
2009-01-26 Adam Roben <aroben@apple.com>
Fix an assertion on launch in KURL::KURL
......
......@@ -486,8 +486,13 @@ void WebFrame::loadData(PassRefPtr<WebCore::SharedBuffer> data, BSTR mimeType, B
mimeTypeString = "text/html";
String encodingString(textEncodingName, SysStringLen(textEncodingName));
KURL baseKURL(String(baseURL ? baseURL : L"", SysStringLen(baseURL)));
KURL failingKURL(String(failingURL, SysStringLen(failingURL)));
// FIXME: We should really be using MarshallingHelpers::BSTRToKURL here,
// but that would turn a null BSTR into a null KURL, and we crash inside of
// WebCore if we use a null KURL in constructing the ResourceRequest.
KURL baseKURL = KURL(KURL(), String(baseURL ? baseURL : L"", SysStringLen(baseURL)));
KURL failingKURL = MarshallingHelpers::BSTRToKURL(failingURL);
ResourceRequest request(baseKURL);
SubstituteData substituteData(data, mimeTypeString, encodingString, failingKURL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment