https://bugs.webkit.org/show_bug.cgi?id=79120
Reviewed by Martin Robinson.
* Shared/gtk/WebCoreArgumentCodersGtk.cpp:
(CoreIPC::::encode): Encode a boolean to indicate whether it's a
Null error.
(CoreIPC::::decode): Check whether the error is Null and do not
continue decoding in such case.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108452
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-21 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Null ResourceErrors are encoded/decoded as empty ResourceErrors
+ https://bugs.webkit.org/show_bug.cgi?id=79120
+
+ Reviewed by Martin Robinson.
+
+ * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
+ (CoreIPC::::encode): Encode a boolean to indicate whether it's a
+ Null error.
+ (CoreIPC::::decode): Check whether the error is Null and do not
+ continue decoding in such case.
+
2012-02-21 No'am Rosenthal <noam.rosenthal@nokia.com>
[Qt][WK2] Draw tiles of previous contents-scale for opaque layers if they don't intersect with previous tiles
void ArgumentCoder<ResourceError>::encode(ArgumentEncoder* encoder, const ResourceError& resourceError)
{
+ bool errorIsNull = resourceError.isNull();
+ encoder->encode(errorIsNull);
+ if (errorIsNull)
+ return;
+
encoder->encode(resourceError.domain());
encoder->encode(resourceError.errorCode());
encoder->encode(resourceError.failingURL());
bool ArgumentCoder<ResourceError>::decode(ArgumentDecoder* decoder, ResourceError& resourceError)
{
+ bool errorIsNull;
+ if (!decoder->decode(errorIsNull))
+ return false;
+ if (errorIsNull) {
+ resourceError = ResourceError();
+ return true;
+ }
+
String domain;
if (!decoder->decode(domain))
return false;