Bug 138049 - Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
Summary: Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformReq...
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 146470
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-24 11:06 PDT by Chris Dumez
Modified: 2015-07-01 09:26 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.00 KB, patch)
2014-10-24 11:23 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.