[Curl] Crash on synchronous request via ResourceHandle.
authorBasuke.Suzuki@sony.com <Basuke.Suzuki@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2018 18:19:17 +0000 (18:19 +0000)
committerBasuke.Suzuki@sony.com <Basuke.Suzuki@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2018 18:19:17 +0000 (18:19 +0000)
commit0db55a5c2f6a0236f6d46181afb638ded683ffd7
tree2f09475317bf8f87d0690a407b10fbd224ba7563
parentb13cb59d714578fe64748f54595c60e70e9eecdc
[Curl] Crash on synchronous request via ResourceHandle.
https://bugs.webkit.org/show_bug.cgi?id=188033

Reviewed by Alex Christensen.

Source/WebCore:

The timing of instantiation of delegate was wrong. Move it inside `delegate` getter().
This bug was introduced at r228577.

Test: http/tests/xmlhttprequest/simple-sync.html

* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::delegate):

LayoutTests:

bug/188033 Crash sync xmlhttprequest

* platform/wincairo/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/wincairo/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp