Changeset 287141 in webkit


Ignore:
Timestamp:
Dec 16, 2021, 9:17:01 AM (3 years ago)
Author:
achristensen@apple.com
Message:

Unreviewed, reverting r287056.
<rdar://86519800>

Caused performance regression...again

Reverted changeset:

"Remove properties set by NSURLProtocol on NSURLRequest before
serializing"
https://bugs.webkit.org/show_bug.cgi?id=232332
https://commits.webkit.org/r287056

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r287138 r287141  
     12021-12-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unreviewed, reverting r287056.
     4        <rdar://86519800>
     5
     6        Caused performance regression...again
     7
     8        Reverted changeset:
     9
     10        "Remove properties set by NSURLProtocol on NSURLRequest before
     11        serializing"
     12        https://bugs.webkit.org/show_bug.cgi?id=232332
     13        https://commits.webkit.org/r287056
     14
    1152021-12-15  Darin Adler  <darin@apple.com>
    216
  • trunk/Source/WTF/wtf/PlatformHave.h

    r287094 r287141  
    935935    || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 80400)
    936936#define HAVE_RSA_PSS_OID 1
    937 #define HAVE_NSURLREQUEST_REMOVE_ALL_PROTOCOL_PROPERTIES 1
    938937#endif
    939938
  • trunk/Source/WebCore/PAL/ChangeLog

    r287056 r287141  
     12021-12-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unreviewed, reverting r287056.
     4        <rdar://86519800>
     5
     6        Caused performance regression...again
     7
     8        Reverted changeset:
     9
     10        "Remove properties set by NSURLProtocol on NSURLRequest before
     11        serializing"
     12        https://bugs.webkit.org/show_bug.cgi?id=232332
     13        https://commits.webkit.org/r287056
     14
    1152021-12-14  Alex Christensen  <achristensen@webkit.org>
    216
  • trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h

    r287056 r287141  
    175175
    176176@interface NSMutableURLRequest ()
    177 #if HAVE(NSURLREQUEST_REMOVE_ALL_PROTOCOL_PROPERTIES)
    178 - (void)_removeAllProtocolProperties;
    179 #endif
    180177- (void)setContentDispositionEncodingFallbackArray:(NSArray *)theEncodingFallbackArray;
    181178- (void)setBoundInterfaceIdentifier:(NSString *)identifier;
     
    195192
    196193@interface NSURLRequest ()
    197 #if HAVE(NSURLREQUEST_REMOVE_ALL_PROTOCOL_PROPERTIES)
    198 @property (nonatomic, readonly, nullable, retain) NSDictionary<NSString *, id> *_allProtocolProperties;
    199 #endif
    200194+ (NSArray *)allowsSpecificHTTPSCertificateForHost:(NSString *)host;
    201195+ (void)setAllowsSpecificHTTPSCertificate:(NSArray *)allow forHost:(NSString *)host;
  • trunk/Source/WebKit/ChangeLog

    r287138 r287141  
     12021-12-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unreviewed, reverting r287056.
     4        <rdar://86519800>
     5
     6        Caused performance regression...again
     7
     8        Reverted changeset:
     9
     10        "Remove properties set by NSURLProtocol on NSURLRequest before
     11        serializing"
     12        https://bugs.webkit.org/show_bug.cgi?id=232332
     13        https://commits.webkit.org/r287056
     14
    1152021-12-15  Darin Adler  <darin@apple.com>
    216
  • trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm

    r287056 r287141  
    3838#import <WebCore/ResourceRequest.h>
    3939#import <WebCore/TextRecognitionResult.h>
    40 #import <pal/spi/cf/CFNetworkSPI.h>
    4140#import <pal/spi/cf/CoreTextSPI.h>
    4241
     
    627626    // We don't send HTTP body over IPC for better performance.
    628627    // Also, it's not always possible to do, as streams can only be created in process that does networking.
    629     bool hasHTTPBody = [requestToSerialize HTTPBody] || [requestToSerialize HTTPBodyStream];
    630 #if HAVE(NSURLREQUEST_REMOVE_ALL_PROTOCOL_PROPERTIES)
    631     bool hasProtocolProperties = [requestToSerialize _allProtocolProperties];
    632 #else
    633     bool hasProtocolProperties = false;
    634 #endif
    635 
    636     if (hasHTTPBody || hasProtocolProperties) {
     628    if ([requestToSerialize HTTPBody] || [requestToSerialize HTTPBodyStream]) {
    637629        auto mutableRequest = adoptNS([requestToSerialize mutableCopy]);
    638630        [mutableRequest setHTTPBody:nil];
    639631        [mutableRequest setHTTPBodyStream:nil];
    640 #if HAVE(NSURLREQUEST_REMOVE_ALL_PROTOCOL_PROPERTIES)
    641         [mutableRequest _removeAllProtocolProperties];
    642 #endif
    643632        requestToSerialize = WTFMove(mutableRequest);
    644633    }
  • trunk/Tools/ChangeLog

    r287138 r287141  
     12021-12-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unreviewed, reverting r287056.
     4        <rdar://86519800>
     5
     6        Caused performance regression...again
     7
     8        Reverted changeset:
     9
     10        "Remove properties set by NSURLProtocol on NSURLRequest before
     11        serializing"
     12        https://bugs.webkit.org/show_bug.cgi?id=232332
     13        https://commits.webkit.org/r287056
     14
    1152021-12-15  Darin Adler  <darin@apple.com>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm

    r287056 r287141  
    138138}
    139139
    140 TEST(WebKit, LoadNSURLRequestWithProtocolProperties)
    141 {
    142     auto request = adoptNS([[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"test:///"]]);
    143 
    144     [NSURLProtocol setProperty:@"world" forKey:@"hello" inRequest:request.get()];
    145     auto handler = adoptNS([TestURLSchemeHandler new]);
    146     __block bool done = false;
    147     handler.get().startURLSchemeTaskHandler = ^(WKWebView *, id<WKURLSchemeTask> task) {
    148 #if HAVE(NSURLREQUEST_REMOVE_ALL_PROTOCOL_PROPERTIES)
    149         EXPECT_FALSE([NSURLProtocol propertyForKey:@"hello" inRequest:task.request]);
    150 #else
    151         EXPECT_TRUE([NSURLProtocol propertyForKey:@"hello" inRequest:task.request]);
    152 #endif
    153         done = true;
    154     };
    155     auto configuration = adoptNS([WKWebViewConfiguration new]);
    156     [configuration setURLSchemeHandler:handler.get() forURLScheme:@"test"];
    157     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSZeroRect configuration:configuration.get()]);
    158     [webView loadRequest:request.get()];
    159     Util::run(&done);
    160 }
    161 
    162140} // namespace TestWebKitAPI
    163141
Note: See TracChangeset for help on using the changeset viewer.