Skip to content

Commit

Permalink
Merge r176071 - [SOUP] Missing ResourceRequest members encoded/decoded
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=138694

Reviewed by Sergio Villar Senin.

At least timeoutInterval and priority should also be
encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/
tests when using the network process, since the timeout is always
0 for all requests that we send to the network process.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

Canonical link: https://commits.webkit.org/154760.204@webkitgtk/2.6
git-svn-id: https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.6@176184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Nov 17, 2014
1 parent 23ca976 commit 123a634
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,19 @@
2014-11-13 Carlos Garcia Campos <cgarcia@igalia.com>

[SOUP] Missing ResourceRequest members encoded/decoded
https://bugs.webkit.org/show_bug.cgi?id=138694

Reviewed by Sergio Villar Senin.

At least timeoutInterval and priority should also be
encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/
tests when using the network process, since the timeout is always
0 for all requests that we send to the network process.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

2014-11-12 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.6.3 release.
Expand Down
12 changes: 12 additions & 0 deletions Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp
Expand Up @@ -44,6 +44,7 @@ void ArgumentCoder<ResourceRequest>::encodePlatformData(ArgumentEncoder& encoder
encoder << resourceRequest.url().string();
encoder << resourceRequest.httpMethod();
encoder << resourceRequest.httpHeaderFields();
encoder << resourceRequest.timeoutInterval();

// FIXME: Do not encode HTTP message body.
// 1. It can be large and thus costly to send across.
Expand All @@ -54,6 +55,7 @@ void ArgumentCoder<ResourceRequest>::encodePlatformData(ArgumentEncoder& encoder
encoder << httpBody->flattenToString();

encoder << resourceRequest.firstPartyForCookies().string();
encoder.encodeEnum(resourceRequest.priority());

encoder << static_cast<uint32_t>(resourceRequest.soupMessageFlags());
encoder << resourceRequest.initiatingPageID();
Expand All @@ -76,6 +78,11 @@ bool ArgumentCoder<ResourceRequest>::decodePlatformData(ArgumentDecoder& decoder
return false;
resourceRequest.setHTTPHeaderFields(WTF::move(headers));

double timeoutInterval;
if (!decoder.decode(timeoutInterval))
return false;
resourceRequest.setTimeoutInterval(timeoutInterval);

bool hasHTTPBody;
if (!decoder.decode(hasHTTPBody))
return false;
Expand All @@ -91,6 +98,11 @@ bool ArgumentCoder<ResourceRequest>::decodePlatformData(ArgumentDecoder& decoder
return false;
resourceRequest.setFirstPartyForCookies(URL(URL(), firstPartyForCookies));

ResourceLoadPriority priority;
if (!decoder.decodeEnum(priority))
return false;
resourceRequest.setPriority(priority);

uint32_t soupMessageFlags;
if (!decoder.decode(soupMessageFlags))
return false;
Expand Down

0 comments on commit 123a634

Please sign in to comment.