bool NetworkResourceLoader::sendAbortingOnFailure(T&& message, unsigned messageSendFlags)
{
    bool result = messageSenderConnection()->send(std::forward<T>(message), messageSenderDestinationID(), messageSendFlags);
    if (!result)
        abort();
    return result;
}
Esempio n. 2
0
void NetworkResourceLoader::didFailLoading(const ResourceError& error)
{
    RELEASE_LOG_IF_ALLOWED("didFailLoading: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isTimeout = %d, isCancellation = %d, errCode = %d)", m_parameters.webPageID, m_parameters.webFrameID, m_parameters.identifier, error.isTimeout(), error.isCancellation(), error.errorCode());

    ASSERT(!error.isNull());

#if ENABLE(NETWORK_CACHE)
    m_cacheEntryForValidation = nullptr;
#endif

    if (isSynchronous()) {
        m_synchronousLoadData->error = error;
        sendReplyToSynchronousRequest(*m_synchronousLoadData, nullptr);
    } else if (auto* connection = messageSenderConnection())
        connection->send(Messages::WebResourceLoader::DidFailResourceLoad(error), messageSenderDestinationID());

    cleanup();
}
Esempio n. 3
0
bool MessageSender::sendMessage(std::unique_ptr<MessageEncoder> encoder)
{
    ASSERT(messageSenderConnection());

    return messageSenderConnection()->sendMessage(std::move(encoder));
}
Esempio n. 4
0
bool MessageSender::sendMessage(PassOwnPtr<MessageEncoder> encoder)
{
    ASSERT(messageSenderConnection());

    return messageSenderConnection()->sendMessage(encoder);
}
Esempio n. 5
0
bool MessageSender::sendMessage(std::unique_ptr<MessageEncoder> encoder, unsigned messageSendFlags)
{
    ASSERT(messageSenderConnection());

    return messageSenderConnection()->sendMessage(WTF::move(encoder), messageSendFlags);
}