[soup] Crash while loading http://www.jusco.cn
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Mar 2012 18:15:32 +0000 (18:15 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Mar 2012 18:15:32 +0000 (18:15 +0000)
commit96c148e544aec9d9d3c1861dd403d650de1ba352
tree5ceeac27120e6bb875ece0110d83e0f31042a154
parent32af4a87e3a04700885196f56f4359cf3fd0a802
[soup] Crash while loading http://www.jusco.cn
https://bugs.webkit.org/show_bug.cgi?id=68238

Reviewed by Philippe Normand.

.:

* configure.ac: Bumped the libsoup dependency to 2.37.90.

Source/WebCore:

Test: http/tests/xmlhttprequest/xmlhttprequest-sync-no-timers.html

When running synchronous XMLHttpRequests, push a new inner thread default
context, so that other sources from timers and network activity do not run.
This will make synchronous requests truly synchronous with the rest of
WebCore.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCoreSynchronousLoader): Clean up the method definitions a bit by writing them inline.
(WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader): Push a new thread default
context to prevent other sources from running.
(WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader): Pop the inner thread default context.
(WebCore::closeCallback): If the client is synchronous call didFinishLoading now.
(WebCore::readCallback): Only call didFinishLoading if the client isn't synchronous.
(WebCore::ResourceHandle::defaultSession): Activate use-thread-context so that the soup session
respects the inner thread context.
(ResourceHandleClient):
(WebCore::ResourceHandleClient::isSynchronousClient): Added this virtual method.

Tools:

* gtk/jhbuild.modules: Bumped the libsoup and glib dependencies
in the jhbuild file.

LayoutTests:

* http/tests/xmlhttprequest/xmlhttprequest-sync-no-timers-expected.txt: Added.
* http/tests/xmlhttprequest/xmlhttprequest-sync-no-timers.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@109760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-sync-no-timers-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-sync-no-timers.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/network/ResourceHandleClient.h
Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
Tools/ChangeLog
Tools/gtk/jhbuild.modules
configure.ac