Changeset 252260 in webkit


Ignore:
Timestamp:
Nov 8, 2019 1:34:49 PM (4 years ago)
Author:
achristensen@apple.com
Message:

Make DownloadID an ObjectIdentifier
https://bugs.webkit.org/show_bug.cgi?id=203962

Reviewed by Youenn Fablet.

Also deprecate the unused WKDownloadGetID because this identifier is internal.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download):
(WebKit::Download::didReceiveData):
(WebKit::Download::didFinish):
(WebKit::Download::didFail):
(WebKit::Download::didCancel):
(WebKit::Download::messageSenderDestinationID const):

  • NetworkProcess/Downloads/DownloadID.h:

(WebKit::DownloadID::DownloadID): Deleted.
(WebKit::DownloadID::operator== const): Deleted.
(WebKit::DownloadID::operator!= const): Deleted.
(WebKit::DownloadID::downloadID const): Deleted.
(IPC::ArgumentCoder<WebKit::DownloadID>::encode): Deleted.
(IPC::ArgumentCoder<WebKit::DownloadID>::decode): Deleted.
(WTF::DownloadIDHash::hash): Deleted.
(WTF::DownloadIDHash::equal): Deleted.
(WTF::HashTraits<WebKit::DownloadID>::emptyValue): Deleted.
(WTF::HashTraits<WebKit::DownloadID>::constructDeletedValue): Deleted.
(WTF::HashTraits<WebKit::DownloadID>::isDeletedValue): Deleted.

  • NetworkProcess/Downloads/DownloadMonitor.cpp:

(WebKit::DownloadMonitor::applicationWillEnterForeground):
(WebKit::DownloadMonitor::applicationDidEnterBackground):
(WebKit::DownloadMonitor::timerFired):

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::messageSenderDestinationID const):

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::setPendingDownloadID):
(WebKit::NetworkDataTask::isDownload const):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::pendingDownloadCanceled):
(WebKit::NetworkProcess::findPendingDownloadLocation):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::convertToDownload):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
(WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):

  • Scripts/webkit/messages.py:
  • Shared/Authentication/AuthenticationManager.h:
  • UIProcess/API/C/WKDownload.cpp:

(WKDownloadGetID):

  • UIProcess/API/C/WKDownload.h:
  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::DownloadProxy):
(WebKit::generateDownloadID): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxyMap.cpp:

(WebKit::DownloadProxyMap::createDownloadProxy):
(WebKit::DownloadProxyMap::downloadFinished):
(WebKit::DownloadProxyMap::invalidate):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):

  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.h:
Location:
trunk/Source/WebKit
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r252259 r252260  
     12019-11-08  Alex Christensen  <achristensen@webkit.org>
     2
     3        Make DownloadID an ObjectIdentifier
     4        https://bugs.webkit.org/show_bug.cgi?id=203962
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Also deprecate the unused WKDownloadGetID because this identifier is internal.
     9
     10        * NetworkProcess/Downloads/Download.cpp:
     11        (WebKit::Download::Download):
     12        (WebKit::Download::didReceiveData):
     13        (WebKit::Download::didFinish):
     14        (WebKit::Download::didFail):
     15        (WebKit::Download::didCancel):
     16        (WebKit::Download::messageSenderDestinationID const):
     17        * NetworkProcess/Downloads/DownloadID.h:
     18        (WebKit::DownloadID::DownloadID): Deleted.
     19        (WebKit::DownloadID::operator== const): Deleted.
     20        (WebKit::DownloadID::operator!= const): Deleted.
     21        (WebKit::DownloadID::downloadID const): Deleted.
     22        (IPC::ArgumentCoder<WebKit::DownloadID>::encode): Deleted.
     23        (IPC::ArgumentCoder<WebKit::DownloadID>::decode): Deleted.
     24        (WTF::DownloadIDHash::hash): Deleted.
     25        (WTF::DownloadIDHash::equal): Deleted.
     26        (WTF::HashTraits<WebKit::DownloadID>::emptyValue): Deleted.
     27        (WTF::HashTraits<WebKit::DownloadID>::constructDeletedValue): Deleted.
     28        (WTF::HashTraits<WebKit::DownloadID>::isDeletedValue): Deleted.
     29        * NetworkProcess/Downloads/DownloadMonitor.cpp:
     30        (WebKit::DownloadMonitor::applicationWillEnterForeground):
     31        (WebKit::DownloadMonitor::applicationDidEnterBackground):
     32        (WebKit::DownloadMonitor::timerFired):
     33        * NetworkProcess/Downloads/PendingDownload.cpp:
     34        (WebKit::PendingDownload::messageSenderDestinationID const):
     35        * NetworkProcess/Downloads/PendingDownload.h:
     36        * NetworkProcess/NetworkDataTask.h:
     37        (WebKit::NetworkDataTask::setPendingDownloadID):
     38        (WebKit::NetworkDataTask::isDownload const):
     39        * NetworkProcess/NetworkProcess.cpp:
     40        (WebKit::NetworkProcess::pendingDownloadCanceled):
     41        (WebKit::NetworkProcess::findPendingDownloadLocation):
     42        * NetworkProcess/NetworkProcess.h:
     43        * NetworkProcess/NetworkResourceLoader.cpp:
     44        (WebKit::NetworkResourceLoader::convertToDownload):
     45        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
     46        (-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
     47        (-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
     48        (-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
     49        (WebKit::NetworkSessionCocoa::continueDidReceiveChallenge):
     50        * Scripts/webkit/messages.py:
     51        * Shared/Authentication/AuthenticationManager.h:
     52        * UIProcess/API/C/WKDownload.cpp:
     53        (WKDownloadGetID):
     54        * UIProcess/API/C/WKDownload.h:
     55        * UIProcess/Downloads/DownloadProxy.cpp:
     56        (WebKit::DownloadProxy::DownloadProxy):
     57        (WebKit::generateDownloadID): Deleted.
     58        * UIProcess/Downloads/DownloadProxy.h:
     59        * UIProcess/Downloads/DownloadProxyMap.cpp:
     60        (WebKit::DownloadProxyMap::createDownloadProxy):
     61        (WebKit::DownloadProxyMap::downloadFinished):
     62        (WebKit::DownloadProxyMap::invalidate):
     63        * WebProcess/WebPage/WebFrame.cpp:
     64        (WebKit::WebFrame::startDownload):
     65        (WebKit::WebFrame::convertMainResourceLoadToDownload):
     66        * WebProcess/WebPage/WebFrame.h:
     67        * WebProcess/WebPage/WebPage.h:
     68
    1692019-11-08  Alex Christensen  <achristensen@webkit.org>
    270
  • trunk/Source/WebKit/NetworkProcess/Downloads/Download.cpp

    r250521 r252260  
    6060    , m_testSpeedMultiplier(session.testSpeedMultiplier())
    6161{
    62     ASSERT(m_downloadID.downloadID());
     62    ASSERT(m_downloadID);
    6363
    6464    m_downloadManager.didCreateDownload();
     
    7575    , m_testSpeedMultiplier(session.testSpeedMultiplier())
    7676{
    77     ASSERT(m_downloadID.downloadID());
     77    ASSERT(m_downloadID);
    7878
    7979    m_downloadManager.didCreateDownload();
     
    121121{
    122122    if (!m_hasReceivedData) {
    123         RELEASE_LOG_IF_ALLOWED("didReceiveData: Started receiving data (id = %" PRIu64 ")", downloadID().downloadID());
     123        RELEASE_LOG_IF_ALLOWED("didReceiveData: Started receiving data (id = %" PRIu64 ")", downloadID().toUInt64());
    124124        m_hasReceivedData = true;
    125125    }
     
    132132void Download::didFinish()
    133133{
    134     RELEASE_LOG_IF_ALLOWED("didFinish: (id = %" PRIu64 ")", downloadID().downloadID());
     134    RELEASE_LOG_IF_ALLOWED("didFinish: (id = %" PRIu64 ")", downloadID().toUInt64());
    135135
    136136    send(Messages::DownloadProxy::DidFinish());
     
    147147{
    148148    RELEASE_LOG_IF_ALLOWED("didFail: (id = %" PRIu64 ", isTimeout = %d, isCancellation = %d, errCode = %d)",
    149         downloadID().downloadID(), error.isTimeout(), error.isCancellation(), error.errorCode());
     149        downloadID().toUInt64(), error.isTimeout(), error.isCancellation(), error.errorCode());
    150150
    151151    send(Messages::DownloadProxy::DidFail(error, resumeData));
     
    160160void Download::didCancel(const IPC::DataReference& resumeData)
    161161{
    162     RELEASE_LOG_IF_ALLOWED("didCancel: (id = %" PRIu64 ")", downloadID().downloadID());
     162    RELEASE_LOG_IF_ALLOWED("didCancel: (id = %" PRIu64 ")", downloadID().toUInt64());
    163163
    164164    send(Messages::DownloadProxy::DidCancel(resumeData));
     
    178178uint64_t Download::messageSenderDestinationID() const
    179179{
    180     return m_downloadID.downloadID();
     180    return m_downloadID.toUInt64();
    181181}
    182182
  • trunk/Source/WebKit/NetworkProcess/Downloads/DownloadID.h

    r204668 r252260  
    2424 */
    2525
    26 #ifndef DownloadID_h
    27 #define DownloadID_h
     26#pragma once
    2827
    29 #include "ArgumentCoder.h"
    30 #include "Decoder.h"
    31 #include "Encoder.h"
    32 #include <wtf/HashTraits.h>
     28#include <wtf/ObjectIdentifier.h>
    3329
    3430namespace WebKit {
    3531
    36 class DownloadID {
    37 public:
    38     DownloadID()
    39     {
    40     }
    41 
    42     explicit DownloadID(uint64_t downloadID)
    43         : m_downloadID(downloadID)
    44     {
    45     }
    46 
    47     bool operator==(DownloadID other) const { return m_downloadID == other.m_downloadID; }
    48     bool operator!=(DownloadID other) const { return m_downloadID != other.m_downloadID; }
    49 
    50     uint64_t downloadID() const { return m_downloadID; }
    51 private:
    52     uint64_t m_downloadID { 0 };
    53 };
     32enum DownloadIdentifierType { };
     33using DownloadID = ObjectIdentifier<DownloadIdentifierType>;
    5434
    5535}
    56 
    57 namespace IPC {
    58    
    59 template<> struct ArgumentCoder<WebKit::DownloadID> {
    60     static void encode(Encoder& encoder, const WebKit::DownloadID& downloadID)
    61     {
    62         encoder << downloadID.downloadID();
    63     }
    64     static bool decode(Decoder& decoder, WebKit::DownloadID& downloadID)
    65     {
    66         uint64_t id;
    67         if (!decoder.decode(id))
    68             return false;
    69 
    70         downloadID = WebKit::DownloadID(id);
    71        
    72         return true;
    73     }
    74 };
    75 
    76 }
    77 
    78 namespace WTF {
    79    
    80 struct DownloadIDHash {
    81     static unsigned hash(const WebKit::DownloadID& d) { return intHash(d.downloadID()); }
    82     static bool equal(const WebKit::DownloadID& a, const WebKit::DownloadID& b) { return a.downloadID() == b.downloadID(); }
    83     static const bool safeToCompareToEmptyOrDeleted = true;
    84 };
    85 template<> struct HashTraits<WebKit::DownloadID> : GenericHashTraits<WebKit::DownloadID> {
    86     static WebKit::DownloadID emptyValue() { return { }; }
    87    
    88     static void constructDeletedValue(WebKit::DownloadID& slot) { slot = WebKit::DownloadID(std::numeric_limits<uint64_t>::max()); }
    89     static bool isDeletedValue(const WebKit::DownloadID& slot) { return slot.downloadID() == std::numeric_limits<uint64_t>::max(); }
    90 };
    91 template<> struct DefaultHash<WebKit::DownloadID> {
    92     typedef DownloadIDHash Hash;
    93 };
    94 
    95 }
    96 #endif /* DownloadID_h */
  • trunk/Source/WebKit/NetworkProcess/Downloads/DownloadMonitor.cpp

    r250521 r252260  
    9494void DownloadMonitor::applicationWillEnterForeground()
    9595{
    96     RELEASE_LOG_IF_ALLOWED("applicationWillEnterForeground (id = %" PRIu64 ")", m_download.downloadID().downloadID());
     96    RELEASE_LOG_IF_ALLOWED("applicationWillEnterForeground (id = %" PRIu64 ")", m_download.downloadID().toUInt64());
    9797    m_timer.stop();
    9898    m_interval = 0;
     
    101101void DownloadMonitor::applicationDidEnterBackground()
    102102{
    103     RELEASE_LOG_IF_ALLOWED("applicationDidEnterBackground (id = %" PRIu64 ")", m_download.downloadID().downloadID());
     103    RELEASE_LOG_IF_ALLOWED("applicationDidEnterBackground (id = %" PRIu64 ")", m_download.downloadID().toUInt64());
    104104    ASSERT(!m_timer.isActive());
    105105    ASSERT(!m_interval);
     
    118118    RELEASE_ASSERT(m_interval < WTF_ARRAY_LENGTH(throughputIntervals));
    119119    if (measuredThroughputRate() < throughputIntervals[m_interval].bytesPerSecond) {
    120         RELEASE_LOG_IF_ALLOWED("timerFired: cancelling download (id = %" PRIu64 ")", m_download.downloadID().downloadID());
     120        RELEASE_LOG_IF_ALLOWED("timerFired: cancelling download (id = %" PRIu64 ")", m_download.downloadID().toUInt64());
    121121        m_download.cancel();
    122122    } else if (m_interval + 1 < WTF_ARRAY_LENGTH(throughputIntervals)) {
    123         RELEASE_LOG_IF_ALLOWED("timerFired: sufficient throughput rate (id = %" PRIu64 ")", m_download.downloadID().downloadID());
     123        RELEASE_LOG_IF_ALLOWED("timerFired: sufficient throughput rate (id = %" PRIu64 ")", m_download.downloadID().toUInt64());
    124124        m_timer.startOneShot(timeUntilNextInterval(m_interval++) / testSpeedMultiplier());
    125125    } else
    126         RELEASE_LOG_IF_ALLOWED("timerFired: Download reached threshold to not be terminated (id = %" PRIu64 ")", m_download.downloadID().downloadID());
     126        RELEASE_LOG_IF_ALLOWED("timerFired: Download reached threshold to not be terminated (id = %" PRIu64 ")", m_download.downloadID().toUInt64());
    127127}
    128128
  • trunk/Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp

    r248846 r252260  
    111111uint64_t PendingDownload::messageSenderDestinationID() const
    112112{
    113     return m_networkLoad->pendingDownloadID().downloadID();
     113    return m_networkLoad->pendingDownloadID().toUInt64();
    114114}
    115115   
  • trunk/Source/WebKit/NetworkProcess/Downloads/PendingDownload.h

    r241008 r252260  
    2626#pragma once
    2727
     28#include "DownloadID.h"
    2829#include "MessageSender.h"
    2930#include "NetworkLoadClient.h"
     
    4243
    4344class Download;
    44 class DownloadID;
    4545class NetworkLoad;
    4646class NetworkLoadParameters;
  • trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h

    r252185 r252260  
    109109    void setPendingDownloadID(DownloadID downloadID)
    110110    {
    111         ASSERT(!m_pendingDownloadID.downloadID());
    112         ASSERT(downloadID.downloadID());
     111        ASSERT(!m_pendingDownloadID);
     112        ASSERT(downloadID);
    113113        m_pendingDownloadID = downloadID;
    114114    }
     
    121121    virtual void setPendingDownloadLocation(const String& filename, SandboxExtension::Handle&&, bool /*allowOverwrite*/) { m_pendingDownloadLocation = filename; }
    122122    const String& pendingDownloadLocation() const { return m_pendingDownloadLocation; }
    123     bool isDownload() const { return !!m_pendingDownloadID.downloadID(); }
     123    bool isDownload() const { return !!m_pendingDownloadID; }
    124124
    125125    const WebCore::ResourceRequest& firstRequest() const { return m_firstRequest; }
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp

    r252259 r252260  
    19681968void NetworkProcess::pendingDownloadCanceled(DownloadID downloadID)
    19691969{
    1970     downloadProxyConnection()->send(Messages::DownloadProxy::DidCancel({ }), downloadID.downloadID());
     1970    downloadProxyConnection()->send(Messages::DownloadProxy::DidCancel({ }), downloadID);
    19711971}
    19721972
    19731973void NetworkProcess::findPendingDownloadLocation(NetworkDataTask& networkDataTask, ResponseCompletionHandler&& completionHandler, const ResourceResponse& response)
    19741974{
    1975     uint64_t destinationID = networkDataTask.pendingDownloadID().downloadID();
     1975    auto destinationID = networkDataTask.pendingDownloadID();
    19761976    downloadProxyConnection()->send(Messages::DownloadProxy::DidReceiveResponse(response), destinationID);
    19771977
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.h

    r252259 r252260  
    2828#include "AuxiliaryProcess.h"
    2929#include "CacheModel.h"
     30#include "DownloadID.h"
    3031#include "DownloadManager.h"
    3132#include "LocalStorageDatabaseTracker.h"
     
    7677class CertificateInfo;
    7778class CurlProxySettings;
    78 class DownloadID;
    7979class ProtectionSpace;
    8080class StorageQuotaManager;
  • trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp

    r252047 r252260  
    357357void NetworkResourceLoader::convertToDownload(DownloadID downloadID, const ResourceRequest& request, const ResourceResponse& response)
    358358{
    359     RELEASE_LOG(Loading, "Converting NetworkResourceLoader %p to download %" PRIu64 " (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", this, downloadID.downloadID(), m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier);
     359    RELEASE_LOG(Loading, "Converting NetworkResourceLoader %p to download %" PRIu64 " (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", this, downloadID.toUInt64(), m_parameters.webPageID.toUInt64(), m_parameters.webFrameID.toUInt64(), m_parameters.identifier);
    360360   
    361361    // This can happen if the resource came from the disk cache.
  • trunk/Source/WebKit/NetworkProcess/WebSocketTask.h

    r248762 r252260  
    3232#else
    3333
     34namespace IPC {
     35class DataReference;
     36}
     37
    3438namespace WebKit {
    3539
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

    r252185 r252260  
    688688            return;
    689689        auto downloadID = _sessionWrapper->downloadMap.take(task.taskIdentifier);
    690         if (!downloadID.downloadID())
     690        if (!downloadID)
    691691            return;
    692692        if (!_session)
     
    851851        return;
    852852    auto downloadID = _sessionWrapper->downloadMap.take([downloadTask taskIdentifier]);
    853     if (!downloadID.downloadID())
     853    if (!downloadID)
    854854        return;
    855855    if (!_session)
     
    868868        return;
    869869    auto downloadID = _sessionWrapper->downloadMap.get([downloadTask taskIdentifier]);
    870     if (!downloadID.downloadID())
     870    if (!downloadID)
    871871        return;
    872872    if (!_session)
     
    13061306#endif
    13071307        auto downloadID = sessionWrapper.downloadMap.get(taskIdentifier);
    1308         if (downloadID.downloadID()) {
     1308        if (downloadID) {
    13091309            if (auto* download = networkProcess().downloadManager().download(downloadID)) {
    13101310                WebCore::AuthenticationChallenge authenticationChallenge { challenge };
  • trunk/Source/WebKit/Scripts/webkit/messages.py

    r251445 r252260  
    218218        'WebCore::SWServerConnectionIdentifier',
    219219        'WebKit::ActivityStateChangeID',
     220        'WebKit::DownloadID',
    220221        'WebKit::LayerHostingContextID',
    221222        'WebKit::TransactionID',
  • trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.h

    r251002 r252260  
    2626#pragma once
    2727
     28#include "DownloadID.h"
    2829#include "MessageReceiver.h"
    2930#include "NetworkProcessSupplement.h"
     
    5455namespace WebKit {
    5556
    56 class Download;
    57 class DownloadID;
    5857class NetworkProcess;
    5958class WebFrame;
  • trunk/Source/WebKit/UIProcess/API/C/WKDownload.cpp

    r222468 r252260  
    4141}
    4242
    43 uint64_t WKDownloadGetID(WKDownloadRef download)
     43uint64_t WKDownloadGetID(WKDownloadRef)
    4444{
    45     return toImpl(download)->downloadID().downloadID();
     45    return 0;
    4646}
    4747
  • trunk/Source/WebKit/UIProcess/API/C/WKDownload.h

    r222468 r252260  
    2828
    2929#include <WebKit/WKBase.h>
     30#include <WebKit/WKDeprecated.h>
    3031
    3132#ifndef __cplusplus
     
    3940WK_EXPORT WKTypeID WKDownloadGetTypeID();
    4041
    41 WK_EXPORT uint64_t WKDownloadGetID(WKDownloadRef download);
     42WK_EXPORT uint64_t WKDownloadGetID(WKDownloadRef download) WK_C_API_DEPRECATED;
    4243WK_EXPORT WKURLRequestRef WKDownloadCopyRequest(WKDownloadRef download);
    4344WK_EXPORT WKDataRef WKDownloadGetResumeData(WKDownloadRef download);
  • trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp

    r250292 r252260  
    4545namespace WebKit {
    4646using namespace WebCore;
    47 
    48 static uint64_t generateDownloadID()
    49 {
    50     static uint64_t uniqueDownloadID = 0;
    51     return ++uniqueDownloadID;
    52 }
    5347   
    5448Ref<DownloadProxy> DownloadProxy::create(DownloadProxyMap& downloadProxyMap, WebsiteDataStore& dataStore, WebProcessPool& processPool, const ResourceRequest& resourceRequest)
     
    6155    , m_dataStore(&dataStore)
    6256    , m_processPool(&processPool)
    63     , m_downloadID(generateDownloadID())
     57    , m_downloadID(DownloadID::generate())
    6458    , m_request(resourceRequest)
    6559{
  • trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.h

    r251445 r252260  
    4949namespace WebKit {
    5050
    51 class DownloadID;
    5251class DownloadProxyMap;
    5352class WebPageProxy;
  • trunk/Source/WebKit/UIProcess/Downloads/DownloadProxyMap.cpp

    r250292 r252260  
    8686    m_downloads.set(downloadProxy->downloadID(), downloadProxy.copyRef());
    8787
    88     RELEASE_LOG(Loading, "Adding download %" PRIu64 " to UIProcess DownloadProxyMap", downloadProxy->downloadID().downloadID());
     88    RELEASE_LOG(Loading, "Adding download %" PRIu64 " to UIProcess DownloadProxyMap", downloadProxy->downloadID().toUInt64());
    8989
    9090    if (m_downloads.size() == 1 && m_shouldTakeAssertion) {
     
    9999    }
    100100
    101     m_process->addMessageReceiver(Messages::DownloadProxy::messageReceiverName(), downloadProxy->downloadID().downloadID(), downloadProxy.get());
     101    m_process->addMessageReceiver(Messages::DownloadProxy::messageReceiverName(), downloadProxy->downloadID().toUInt64(), downloadProxy.get());
    102102
    103103    return downloadProxy;
     
    108108    auto downloadID = downloadProxy.downloadID();
    109109
    110     RELEASE_LOG(Loading, "Removing download %" PRIu64 " from UIProcess DownloadProxyMap", downloadID.downloadID());
     110    RELEASE_LOG(Loading, "Removing download %" PRIu64 " from UIProcess DownloadProxyMap", downloadID.toUInt64());
    111111
    112112    // The DownloadProxy may be holding the last reference to the process pool.
     
    115115    ASSERT(m_downloads.contains(downloadID));
    116116
    117     m_process->removeMessageReceiver(Messages::DownloadProxy::messageReceiverName(), downloadID.downloadID());
     117    m_process->removeMessageReceiver(Messages::DownloadProxy::messageReceiverName(), downloadID.toUInt64());
    118118    downloadProxy.invalidate();
    119119    m_downloads.remove(downloadID);
     
    134134        download->processDidClose();
    135135        download->invalidate();
    136         m_process->removeMessageReceiver(Messages::DownloadProxy::messageReceiverName(), download->downloadID().downloadID());
     136        m_process->removeMessageReceiver(Messages::DownloadProxy::messageReceiverName(), download->downloadID().toUInt64());
    137137    }
    138138
  • trunk/Source/WebKit/WebProcess/WebPage/WebFrame.cpp

    r251425 r252260  
    280280void WebFrame::startDownload(const WebCore::ResourceRequest& request, const String& suggestedName)
    281281{
    282     ASSERT(m_policyDownloadID.downloadID());
     282    ASSERT(m_policyDownloadID);
    283283
    284284    auto policyDownloadID = m_policyDownloadID;
     
    290290void WebFrame::convertMainResourceLoadToDownload(DocumentLoader* documentLoader, const ResourceRequest& request, const ResourceResponse& response)
    291291{
    292     ASSERT(m_policyDownloadID.downloadID());
     292    ASSERT(m_policyDownloadID);
    293293
    294294    auto policyDownloadID = m_policyDownloadID;
  • trunk/Source/WebKit/WebProcess/WebPage/WebFrame.h

    r251295 r252260  
    182182    ForNavigationAction m_policyFunctionForNavigationAction { ForNavigationAction::No };
    183183    HashMap<uint64_t, CompletionHandler<void()>> m_willSubmitFormCompletionHandlers;
    184     DownloadID m_policyDownloadID { 0 };
     184    DownloadID m_policyDownloadID;
    185185
    186186    std::unique_ptr<WebFrameLoaderClient> m_frameLoaderClient;
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.h

    r251765 r252260  
    3434#include "APIObject.h"
    3535#include "CallbackID.h"
     36#include "DownloadID.h"
    3637#include "DrawingAreaInfo.h"
    3738#include "EditingRange.h"
     
    210211class DataReference;
    211212class DrawingArea;
    212 class DownloadID;
    213213class FindController;
    214214class GamepadData;
Note: See TracChangeset for help on using the changeset viewer.