Changeset 291810 in webkit


Ignore:
Timestamp:
Mar 24, 2022 12:36:17 PM (2 years ago)
Author:
pvollan@apple.com
Message:

[iOS] Disable unneeded code when content filtering is running in the Network process
https://bugs.webkit.org/show_bug.cgi?id=238332

Reviewed by Geoffrey Garen.

  • Shared/Cocoa/LoadParametersCocoa.mm:

(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):

  • Shared/LoadParameters.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::addPlatformLoadParameters):

  • UIProcess/WebProcessProxy.h:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters):

Location:
trunk/Source/WebKit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r291809 r291810  
     12022-03-24  Per Arne Vollan  <pvollan@apple.com>
     2
     3        [iOS] Disable unneeded code when content filtering is running in the Network process
     4        https://bugs.webkit.org/show_bug.cgi?id=238332
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * Shared/Cocoa/LoadParametersCocoa.mm:
     9        (WebKit::LoadParameters::platformEncode const):
     10        (WebKit::LoadParameters::platformDecode):
     11        * Shared/LoadParameters.h:
     12        * UIProcess/Cocoa/WebPageProxyCocoa.mm:
     13        (WebKit::WebPageProxy::addPlatformLoadParameters):
     14        * UIProcess/WebProcessProxy.h:
     15        * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
     16        (WebKit::WebPage::platformDidReceiveLoadParameters):
     17
    1182022-03-24  Elliott Williams  <emw@apple.com>
    219
  • trunk/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm

    r291630 r291810  
    4040#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    4141    encoder << networkExtensionSandboxExtensionHandles;
    42 #endif
    4342#if PLATFORM(IOS)
    4443    encoder << contentFilterExtensionHandle;
    4544    encoder << frontboardServiceExtensionHandle;
     45#endif
    4646#endif
    4747}
     
    5858        return false;
    5959    parameters.networkExtensionSandboxExtensionHandles = WTFMove(*networkExtensionSandboxExtensionHandles);
    60 #endif
    61 
    6260#if PLATFORM(IOS)
    6361    std::optional<std::optional<SandboxExtension::Handle>> contentFilterExtensionHandle;
     
    7270        return false;
    7371    parameters.frontboardServiceExtensionHandle = WTFMove(*frontboardServiceExtensionHandle);
    74 #endif
     72#endif // PLATFORM(IOS)
     73#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    7574
    7675    return true;
  • trunk/Source/WebKit/Shared/LoadParameters.h

    r291630 r291810  
    8888#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    8989    Vector<SandboxExtension::Handle> networkExtensionSandboxExtensionHandles;
    90 #endif
    91 #endif
    9290#if PLATFORM(IOS)
    9391    std::optional<SandboxExtension::Handle> contentFilterExtensionHandle;
    9492    std::optional<SandboxExtension::Handle> frontboardServiceExtensionHandle;
     93#endif // PLATFORM(IOS)
     94#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    9595#endif
    9696};
  • trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm

    r291630 r291810  
    201201#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    202202    loadParameters.networkExtensionSandboxExtensionHandles = createNetworkExtensionsSandboxExtensions(process);
    203 #endif
    204203#if PLATFORM(IOS)
    205204    if (!process.hasManagedSessionSandboxAccess() && [getWebFilterEvaluatorClass() isManagedSession]) {
     
    212211        process.markHasManagedSessionSandboxAccess();
    213212    }
    214 #endif
     213#endif // PLATFORM(IOS)
     214#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    215215}
    216216
  • trunk/Source/WebKit/UIProcess/WebProcessProxy.h

    r291784 r291810  
    392392    void markHasNetworkExtensionSandboxAccess() { m_hasNetworkExtensionSandboxAccess = true; }
    393393#endif
    394 #if PLATFORM(IOS)
     394#if PLATFORM(IOS) && !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    395395    bool hasManagedSessionSandboxAccess() const { return m_hasManagedSessionSandboxAccess; }
    396396    void markHasManagedSessionSandboxAccess() { m_hasManagedSessionSandboxAccess = true; }
     
    630630    bool m_hasNetworkExtensionSandboxAccess { false };
    631631#endif
    632 #if PLATFORM(IOS)
     632#if PLATFORM(IOS) && !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    633633    bool m_hasManagedSessionSandboxAccess { false };
    634634#endif
  • trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm

    r291630 r291810  
    8585#if !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    8686    consumeNetworkExtensionSandboxExtensions(parameters.networkExtensionSandboxExtensionHandles);
    87 #endif
    88 
    8987#if PLATFORM(IOS)
    9088    if (parameters.contentFilterExtensionHandle)
     
    9492    if (parameters.frontboardServiceExtensionHandle)
    9593        SandboxExtension::consumePermanently(*parameters.frontboardServiceExtensionHandle);
    96 #endif
     94#endif // PLATFORM(IOS)
     95#endif // !ENABLE(CONTENT_FILTERING_IN_NETWORKING_PROCESS)
    9796}
    9897
Note: See TracChangeset for help on using the changeset viewer.