WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155137
Always call NSURLSession completion handlers
https://bugs.webkit.org/show_bug.cgi?id=155137
Summary
Always call NSURLSession completion handlers
Alex Christensen
Reported
2016-03-07 14:41:11 PST
Always call NSURLSession completion handlers
Attachments
Patch
(5.56 KB, patch)
2016-03-07 15:01 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2016-03-07 15:01:34 PST
Created
attachment 273219
[details]
Patch
Brent Fulgham
Comment 2
2016-03-08 08:51:26 PST
Comment on
attachment 273219
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273219&action=review
This seems fine. r=me.
> Source/WebKit2/ChangeLog:10 > + There are also a few release asserts that do not need to crash release builds.
So is this patch just about protecting against a possible problem we could encounter?
Brent Fulgham
Comment 3
2016-03-08 08:52:06 PST
(In reply to
comment #2
)
> Comment on
attachment 273219
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=273219&action=review
> > This seems fine. r=me.
I mean, NOT r=me. You need a WK2 owner. Sorry! (But it seems fine).
Alex Christensen
Comment 4
2016-03-08 10:18:07 PST
Comment on
attachment 273219
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=273219&action=review
>> Source/WebKit2/ChangeLog:10 >> + There are also a few release asserts that do not need to crash release builds. > > So is this patch just about protecting against a possible problem we could encounter?
yep
Darin Adler
Comment 5
2016-03-08 18:08:59 PST
Comment on
attachment 273219
[details]
Patch I do not understand the status of these ASSERT_NOT_REACHED. Will we ever reach these? If so, why?
Alex Christensen
Comment 6
2016-03-09 10:17:26 PST
(In reply to
comment #5
)
> Comment on
attachment 273219
[details]
> Patch > > I do not understand the status of these ASSERT_NOT_REACHED. Will we ever > reach these? If so, why?
We should not reach any of these assertions because once we are doing loading, a session with the given SessionID has already been made in the SessionTracker. If something goes horribly wrong and we are, for example, finishing loading after we have destroyed a session, then these do not need to crash release builds because the only effect might be that we do some loads without credentials.
WebKit Commit Bot
Comment 7
2016-03-09 11:03:56 PST
Comment on
attachment 273219
[details]
Patch Clearing flags on attachment: 273219 Committed
r197865
: <
http://trac.webkit.org/changeset/197865
>
WebKit Commit Bot
Comment 8
2016-03-09 11:03:59 PST
All reviewed patches have been landed. Closing bug.
Alex Christensen
Comment 9
2016-03-10 15:54:56 PST
removed an assertion in
r197965
Alex Christensen
Comment 10
2016-03-10 17:15:21 PST
When a load is redirected to a url that we do not like, we call the willPerformHTTPRedirection completion handler with nil in NetworkLoad::continueWillSendRequest just after the NetworkLoad and NetworkDataTask are destroyed by the call to didFail. When this happens, we get a didReceiveResponse delegate callback for the url that was redirected from, which no longer corresponds to a NetworkDataTask that exists any more in case the 301 response had content that we wanted, but in WebKit we never use that content, so we are correctly calling the completion handler with NSURLSessionResponseCancel. This happens in several tests, including http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect.html
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug