Bug 138049

Summary: Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Page LoadingAssignee: Chris Dumez <cdumez>
Status: REOPENED ---    
Severity: Normal CC: ap, benjamin, commit-queue, darin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 146470    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2014-10-24 11:06:00 PDT
Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody(). It turns out that half the time, m_nsRequest is already mutable so it is unnecessary to call [NSURLRequest mutableCopy], we can just cast to an NSMutableURLRequest* and avoid copying.
Comment 1 Chris Dumez 2014-10-24 11:23:21 PDT
Created attachment 240418 [details]
Patch
Comment 2 WebKit Commit Bot 2014-10-24 12:13:17 PDT
Comment on attachment 240418 [details]
Patch

Clearing flags on attachment: 240418

Committed r175171: <http://trac.webkit.org/changeset/175171>
Comment 3 WebKit Commit Bot 2014-10-24 12:13:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Alexey Proskuryakov 2015-07-01 01:28:47 PDT
This got rolled out. Do we know what the problem was? Was it that the mutable NSURLRequest wasn't expected to be changed?
Comment 5 Chris Dumez 2015-07-01 09:26:22 PDT
(In reply to comment #4)
> This got rolled out. Do we know what the problem was? Was it that the
> mutable NSURLRequest wasn't expected to be changed?

I haven't had time to investigate yet. My priority was to safely and quickly fix the crash at this point and a simple roll out seemed like the right thing to do.
I'll take another look when I get some spare cycles.
Comment 6 Darin Adler 2015-07-01 09:26:48 PDT
Reopening since it was rolled out.