⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249206 in webkit


Ignore:
Timestamp:
Aug 28, 2019, 10:14:27 AM (7 years ago)
Author:
Chris Dumez
Message:

Have WebPageProxy generate the page identifier by itself
https://bugs.webkit.org/show_bug.cgi?id=201223

Reviewed by Ryosuke Niwa.

Have WebPageProxy generate the page identifier by itself instead of
having the WebProcessProxy do it.

  • UIProcess/ServiceWorkerProcessProxy.cpp:

(WebKit::m_serviceWorkerPageID):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::create):
(WebKit::WebPageProxy::WebPageProxy):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::createWebPage):
(WebKit::WebProcessProxy::generatePageID): Deleted.

  • UIProcess/WebProcessProxy.h:
Location:
trunk/Source/WebKit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r249193 r249206  
     12019-08-28  Chris Dumez  <cdumez@apple.com>
     2
     3        Have WebPageProxy generate the page identifier by itself
     4        https://bugs.webkit.org/show_bug.cgi?id=201223
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Have WebPageProxy generate the page identifier by itself instead of
     9        having the WebProcessProxy do it.
     10
     11        * UIProcess/ServiceWorkerProcessProxy.cpp:
     12        (WebKit::m_serviceWorkerPageID):
     13        * UIProcess/WebPageProxy.cpp:
     14        (WebKit::WebPageProxy::create):
     15        (WebKit::WebPageProxy::WebPageProxy):
     16        * UIProcess/WebPageProxy.h:
     17        * UIProcess/WebProcessProxy.cpp:
     18        (WebKit::WebProcessProxy::createWebPage):
     19        (WebKit::WebProcessProxy::generatePageID): Deleted.
     20        * UIProcess/WebProcessProxy.h:
     21
    1222019-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
    223
  • trunk/Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp

    r249096 r249206  
    5454    : WebProcessProxy { pool, &store, IsPrewarmed::No }
    5555    , m_registrableDomain(registrableDomain)
    56     , m_serviceWorkerPageID(generatePageID())
     56    , m_serviceWorkerPageID(PageIdentifier::generate())
    5757{
    5858}
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r249142 r249206  
    388388}
    389389
    390 Ref<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, PageIdentifier pageID, Ref<API::PageConfiguration>&& configuration)
    391 {
    392     return adoptRef(*new WebPageProxy(pageClient, process, pageID, WTFMove(configuration)));
    393 }
    394 
    395 WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, PageIdentifier pageID, Ref<API::PageConfiguration>&& configuration)
    396     : m_pageClient(makeWeakPtr(pageClient))
     390Ref<WebPageProxy> WebPageProxy::create(PageClient& pageClient, WebProcessProxy& process, Ref<API::PageConfiguration>&& configuration)
     391{
     392    return adoptRef(*new WebPageProxy(pageClient, process, WTFMove(configuration)));
     393}
     394
     395WebPageProxy::WebPageProxy(PageClient& pageClient, WebProcessProxy& process, Ref<API::PageConfiguration>&& configuration)
     396    : m_pageID(PageIdentifier::generate())
     397    , m_pageClient(makeWeakPtr(pageClient))
    397398    , m_configuration(WTFMove(configuration))
    398399    , m_navigationClient(makeUniqueRef<API::NavigationClient>())
     
    429430    , m_waitsForPaintAfterViewDidMoveToWindow(m_configuration->waitsForPaintAfterViewDidMoveToWindow())
    430431    , m_hasRunningProcess(process.state() != WebProcessProxy::State::Terminated)
    431     , m_pageID(pageID)
    432432    , m_controlledByAutomation(m_configuration->isControlledByAutomation())
    433433#if PLATFORM(COCOA)
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r249093 r249206  
    386386    , public CanMakeWeakPtr<WebPageProxy> {
    387387public:
    388     static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, WebCore::PageIdentifier, Ref<API::PageConfiguration>&&);
     388    static Ref<WebPageProxy> create(PageClient&, WebProcessProxy&, Ref<API::PageConfiguration>&&);
    389389    virtual ~WebPageProxy();
    390390
     
    15711571
    15721572private:
    1573     WebPageProxy(PageClient&, WebProcessProxy&, WebCore::PageIdentifier, Ref<API::PageConfiguration>&&);
     1573    WebPageProxy(PageClient&, WebProcessProxy&, Ref<API::PageConfiguration>&&);
    15741574    void platformInitialize();
    15751575
     
    21142114    void makeStorageSpaceRequest(WebCore::FrameIdentifier, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&&);
    21152115
     2116    const WebCore::PageIdentifier m_pageID;
    21162117    WeakPtr<PageClient> m_pageClient;
    21172118    Ref<API::PageConfiguration> m_configuration;
     
    23532354#endif
    23542355
    2355     const WebCore::PageIdentifier m_pageID;
    2356 
    23572356    bool m_isPageSuspended { false };
    23582357    bool m_addsVisitedLinks { true };
  • trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp

    r249029 r249206  
    111111}
    112112
    113 PageIdentifier WebProcessProxy::generatePageID()
    114 {
    115     return PageIdentifier::generate();
    116 }
    117 
    118113static WebProcessProxy::WebPageProxyMap& globalPageMap()
    119114{
     
    390385Ref<WebPageProxy> WebProcessProxy::createWebPage(PageClient& pageClient, Ref<API::PageConfiguration>&& pageConfiguration)
    391386{
    392     auto pageID = generatePageID();
    393     Ref<WebPageProxy> webPage = WebPageProxy::create(pageClient, *this, pageID, WTFMove(pageConfiguration));
     387    Ref<WebPageProxy> webPage = WebPageProxy::create(pageClient, *this, WTFMove(pageConfiguration));
    394388
    395389    addExistingWebPage(webPage.get(), BeginsUsingDataStore::Yes);
  • trunk/Source/WebKit/UIProcess/WebProcessProxy.h

    r248713 r249206  
    314314
    315315protected:
    316     static WebCore::PageIdentifier generatePageID();
    317316    WebProcessProxy(WebProcessPool&, WebsiteDataStore*, IsPrewarmed);
    318317
Note: See TracChangeset for help on using the changeset viewer.