https://bugs.webkit.org/show_bug.cgi?id=79471
Reviewed by Philippe Normand.
* Shared/gtk/WebCoreArgumentCodersGtk.cpp:
(CoreIPC::::encode): Check whether ResourceResponse is Null before
encoding it.
(CoreIPC::::decode): Check whether response is Null and create a
Null ResourceResponse object in such case.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108776
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-24 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Encode/decode Null ResourceResponse objects in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=79471
+
+ Reviewed by Philippe Normand.
+
+ * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
+ (CoreIPC::::encode): Check whether ResourceResponse is Null before
+ encoding it.
+ (CoreIPC::::decode): Check whether response is Null and create a
+ Null ResourceResponse object in such case.
+
2012-02-24 Shinya Kawanaka <shinyak@chromium.org>
SpellCheckRequest needs to know the context where the spellcheck happened.
void ArgumentCoder<ResourceResponse>::encode(ArgumentEncoder* encoder, const ResourceResponse& resourceResponse)
{
+ bool responseIsNull = resourceResponse.isNull();
+ encoder->encode(responseIsNull);
+ if (responseIsNull)
+ return;
+
encoder->encode(resourceResponse.url().string());
encoder->encode(static_cast<int32_t>(resourceResponse.httpStatusCode()));
bool ArgumentCoder<ResourceResponse>::decode(ArgumentDecoder* decoder, ResourceResponse& resourceResponse)
{
+ bool responseIsNull;
+ if (!decoder->decode(responseIsNull))
+ return false;
+ if (responseIsNull) {
+ resourceResponse = ResourceResponse();
+ return true;
+ }
+
ResourceResponse response;
String url;