Changeset 285059 in webkit


Ignore:
Timestamp:
Oct 29, 2021, 4:17:10 PM (3 years ago)
Author:
achristensen@apple.com
Message:

Unreviewed, reverting r284917.
Source/WebCore/PAL:

Likely caused significant performance regression

Reverted changeset:

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

Source/WebKit:

<rdar://84807461>

Likely caused significant performance regression

Reverted changeset:

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

Tools:

Likely caused significant performance regression

Reverted changeset:

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

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/PAL/ChangeLog

    r284917 r285059  
     12021-10-29  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unreviewed, reverting r284917.
     4
     5        Likely caused significant performance regression
     6
     7        Reverted changeset:
     8
     9        "Remove properties set by NSURLProtocol on NSURLRequest before
     10        serializing"
     11        https://bugs.webkit.org/show_bug.cgi?id=232332
     12        https://commits.webkit.org/r284917
     13
    1142021-10-26  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h

    r284917 r285059  
    501501@end
    502502
    503 @interface NSMutableURLRequest (Staging_83855325)
    504 - (void)_removeAllProtocolProperties;
    505 @end
    506 
    507 @interface NSURLRequest (Staging_83857142)
    508 @property (nonatomic, readonly, nullable, retain) NSDictionary<NSString *, id> *_allProtocolProperties;
    509 @end
    510 
    511503#endif // defined(__OBJC__)
  • trunk/Source/WebKit/ChangeLog

    r285056 r285059  
     12021-10-29  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unreviewed, reverting r284917.
     4        <rdar://84807461>
     5
     6        Likely caused significant performance regression
     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/r284917
     14
    1152021-10-29  John Pascoe  <j_pascoe@apple.com>
    216
  • trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm

    r284917 r285059  
    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
     
    628627    // We don't send HTTP body over IPC for better performance.
    629628    // Also, it's not always possible to do, as streams can only be created in process that does networking.
    630     bool hasHTTPBody = [requestToSerialize HTTPBody] || [requestToSerialize HTTPBodyStream];
    631    
    632     // FIXME: Replace this respondsToSelector check with a HAS macro once rdar://83857142 has been put in a build and the bots are updated.
    633     bool hasProtocolProperties = [requestToSerialize respondsToSelector:@selector(_allProtocolProperties)] && [requestToSerialize _allProtocolProperties];
    634 
    635     if (hasHTTPBody || hasProtocolProperties) {
     629    if ([requestToSerialize HTTPBody] || [requestToSerialize HTTPBodyStream]) {
    636630        auto mutableRequest = adoptNS([requestToSerialize mutableCopy]);
    637631        [mutableRequest setHTTPBody:nil];
    638632        [mutableRequest setHTTPBodyStream:nil];
    639         // FIXME: Replace this respondsToSelector check with a HAS macro once rdar://83855325 has been put in a build and the bots are updated.
    640         if ([mutableRequest respondsToSelector:@selector(_removeAllProtocolProperties)])
    641             [mutableRequest _removeAllProtocolProperties];
    642633        requestToSerialize = WTFMove(mutableRequest);
    643634    }
  • trunk/Tools/ChangeLog

    r285058 r285059  
     12021-10-29  Alex Christensen  <achristensen@webkit.org>
     2
     3        Unreviewed, reverting r284917.
     4
     5        Likely caused significant performance regression
     6
     7        Reverted changeset:
     8
     9        "Remove properties set by NSURLProtocol on NSURLRequest before
     10        serializing"
     11        https://bugs.webkit.org/show_bug.cgi?id=232332
     12        https://commits.webkit.org/r284917
     13
    1142021-10-29  Alex Christensen  <achristensen@webkit.org>
    215
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm

    r284917 r285059  
    138138}
    139139
    140 TEST(WebKit, LoadNSURLRequestWithProtocolProperties)
    141 {
    142     auto request = adoptNS([[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"test:///"]]);
    143 
    144     // FIXME: Replace this with a HAS macro once rdar://83857142 has been put in a build and the bots are updated.
    145     bool hasRadar83857142 = [request respondsToSelector:@selector(_allProtocolProperties)];
    146 
    147     [NSURLProtocol setProperty:@"world" forKey:@"hello" inRequest:request.get()];
    148     auto handler = adoptNS([TestURLSchemeHandler new]);
    149     __block bool done = false;
    150     handler.get().startURLSchemeTaskHandler = ^(WKWebView *, id<WKURLSchemeTask> task) {
    151         EXPECT_EQ(hasRadar83857142, ![NSURLProtocol propertyForKey:@"hello" inRequest:task.request]);
    152         done = true;
    153     };
    154     auto configuration = adoptNS([WKWebViewConfiguration new]);
    155     [configuration setURLSchemeHandler:handler.get() forURLScheme:@"test"];
    156     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSZeroRect configuration:configuration.get()]);
    157     [webView loadRequest:request.get()];
    158     Util::run(&done);
    159 }
    160 
    161140} // namespace TestWebKitAPI
    162141
Note: See TracChangeset for help on using the changeset viewer.