[BlackBerry] ASSERT in FrameLoaderClient::convertMainResourceLoadToDownload

https://bugs.webkit.org/show_bug.cgi?id=114741

Patch by Xan Lopez <xlopez@igalia.com> on 2013-04-22
Reviewed by George Staikos.

Consider the case where a ResourceHandle won't have a FilterStream
object associated (for example, Blob objects) instead of ASSERTing
pointlessly when asking our network layer for such an object.

This partially fixes fast/dom/HTMLAnchorElement/anchor-nodownload-set.html

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bb2428bc
2013-04-22 Xan Lopez <xlopez@igalia.com>
[BlackBerry] ASSERT in FrameLoaderClient::convertMainResourceLoadToDownload
https://bugs.webkit.org/show_bug.cgi?id=114741
Reviewed by George Staikos.
Consider the case where a ResourceHandle won't have a FilterStream
object associated (for example, Blob objects) instead of ASSERTing
pointlessly when asking our network layer for such an object.
This partially fixes fast/dom/HTMLAnchorElement/anchor-nodownload-set.html
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload):
2013-04-22 Mike Fenton <mifenton@rim.com>
[BlackBerry] Add additional datalist support.
......
......@@ -1187,9 +1187,18 @@ void FrameLoaderClientBlackBerry::startDownload(const ResourceRequest& request,
m_webPagePrivate->load(request.url().string(), BlackBerry::Platform::String::emptyString(), "GET", NetworkRequest::UseProtocolCachePolicy, 0, 0, 0, 0, false, false, true, "", suggestedName);
}
void FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload(DocumentLoader* documentLoader, const ResourceRequest&, const ResourceResponse& r)
void FrameLoaderClientBlackBerry::convertMainResourceLoadToDownload(DocumentLoader* documentLoader, const ResourceRequest& request, const ResourceResponse& r)
{
BlackBerry::Platform::FilterStream* stream = NetworkManager::instance()->streamForHandle(documentLoader->mainResourceLoader()->handle());
// There are cases where there won't have a FilterStream
// associated with a ResourceHandle. For instance, Blob objects
// have their own ResourceHandle class which won't call startJob
// to do the proper setup. Do it here.
if (!stream) {
int playerId = static_cast<FrameLoaderClientBlackBerry*>(m_frame->loader()->client())->playerId();
NetworkManager::instance()->startJob(playerId, documentLoader->mainResourceLoader()->handle(), request, m_frame, false);
stream = NetworkManager::instance()->streamForHandle(documentLoader->mainResourceLoader()->handle());
}
ASSERT(stream);
m_webPagePrivate->m_client->downloadRequested(stream, r.suggestedFilename());
......
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