Changeset 222211 in webkit


Ignore:
Timestamp:
Sep 19, 2017, 10:41:42 AM (8 years ago)
Author:
achristensen@apple.com
Message:

Make _WKProcessPoolConfiguration.allowsCellularAccess actually work on iOS
https://bugs.webkit.org/show_bug.cgi?id=177124

Reviewed by Andy Estes.

The boolean added in r213747 was getting lost in two places:

  1. The API::ProcessPoolConfiguration gets copied before it's used, so we need to set the bool on the copy.
  2. The bool was not getting copied from that ProcessPoolConfiguration to the NetworkProcessCreationParameters

to be sent to the NetworkProcess to be given to the NSURLSessionConfiguration in NetworkSessionCocoa.mm.

These two problems were fixed and verified manually with a customized iOS app on my phone.
Unfortunately, this cannot be tested well with our current test infrastructure.

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r222194 r222211  
     12017-09-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Make _WKProcessPoolConfiguration.allowsCellularAccess actually work on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=177124
     5
     6        Reviewed by Andy Estes.
     7
     8        The boolean added in r213747 was getting lost in two places:
     9        1. The API::ProcessPoolConfiguration gets copied before it's used, so we need to set the bool on the copy.
     10        2. The bool was not getting copied from that ProcessPoolConfiguration to the NetworkProcessCreationParameters
     11        to be sent to the NetworkProcess to be given to the NSURLSessionConfiguration in NetworkSessionCocoa.mm.
     12
     13        These two problems were fixed and verified manually with a customized iOS app on my phone.
     14        Unfortunately, this cannot be tested well with our current test infrastructure.
     15
     16        * UIProcess/API/APIProcessPoolConfiguration.cpp:
     17        (API::ProcessPoolConfiguration::copy):
     18        * UIProcess/WebProcessPool.cpp:
     19        (WebKit::WebProcessPool::ensureNetworkProcess):
     20
    1212017-09-18  Michael Catanzaro  <mcatanzaro@igalia.com>
    222
  • trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp

    r221190 r222211  
    127127    copy->m_ignoreSynchronousMessagingTimeoutsForTesting = this->m_ignoreSynchronousMessagingTimeoutsForTesting;
    128128    copy->m_overrideLanguages = this->m_overrideLanguages;
     129    copy->m_allowsCellularAccess = this->m_allowsCellularAccess;
    129130    copy->m_sourceApplicationBundleIdentifier = this->m_sourceApplicationBundleIdentifier;
    130131    copy->m_sourceApplicationSecondaryIdentifier = this->m_sourceApplicationSecondaryIdentifier;
  • trunk/Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h

    r221175 r222211  
    2424 */
    2525
    26 #ifndef APIContextConfiguration_h
    27 #define APIContextConfiguration_h
     26#pragma once
    2827
    2928#include "APIObject.h"
     
    182181
    183182} // namespace API
    184 
    185 #endif // APIContextConfiguration_h
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r222183 r222211  
    458458    if (!parentBundleDirectory.isEmpty())
    459459        SandboxExtension::createHandle(parentBundleDirectory, SandboxExtension::Type::ReadOnly, parameters.parentBundleDirectoryExtensionHandle);
     460
     461    parameters.allowsCellularAccess = m_configuration->allowsCellularAccess();
    460462#endif
    461463
Note: See TracChangeset for help on using the changeset viewer.