REGRESSION: ( r240978-r240985 ) [ iOS Release ] Layout Test imported/w3c/web-platform...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 18:51:09 +0000 (18:51 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2019 18:51:09 +0000 (18:51 +0000)
commitc431eaca1299b1fe4493131c3e9d3488fb661d8c
tree9e30866ff2b428a053b2d5d80989ff3f4a5acbab
parent2a0c8f8cdc0fbfac48b754e07ba9df4079df366c
REGRESSION: ( r240978-r240985 ) [ iOS Release ] Layout Test imported/w3c/web-platform-tests/xhr/send-redirect-post-upload.htm is crashing
https://bugs.webkit.org/show_bug.cgi?id=194523

Reviewed by Geoffrey Garen.

The scope of the FormCreationContext was limited to the scope of createHTTPBodyCFReadStream,
so when it was used in formCreate it was lucky to get the same context if the stack hadn't been overwritten
and if the FormData hadn't been freed.  Instead, keep it alive with new/delete like we do the FormStreamFields.
A younger me should've noticed this when reviewing r218517.

* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::formCreate):
(WebCore::createHTTPBodyCFReadStream):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp