[Qt][WK2] ResourceError::isCancellation() is always returning false
authorjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2012 19:46:43 +0000 (19:46 +0000)
committerjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Apr 2012 19:46:43 +0000 (19:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82917

Reviewed by Noam Rosenthal.

We were missing the encoding of a boolean in ArgumentCoder<ResourceError>
and, therefore, we were getting always "false" for ResourceError::isCancellation()
for errors being sent through the IPC.

* Shared/qt/WebCoreArgumentCodersQt.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112921 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/qt/WebCoreArgumentCodersQt.cpp

index b648fdc..4e35e95 100644 (file)
@@ -1,3 +1,18 @@
+2012-04-02  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
+
+        [Qt][WK2] ResourceError::isCancellation() is always returning false
+        https://bugs.webkit.org/show_bug.cgi?id=82917
+
+        Reviewed by Noam Rosenthal.
+
+        We were missing the encoding of a boolean in ArgumentCoder<ResourceError>
+        and, therefore, we were getting always "false" for ResourceError::isCancellation()
+        for errors being sent through the IPC.
+
+        * Shared/qt/WebCoreArgumentCodersQt.cpp:
+        (CoreIPC::::encode):
+        (CoreIPC::::decode):
+
 2012-03-29  Sam Weinig  <sam@webkit.org>
 
         Add setting to disable Java for local files even if it is otherwise enabled
index 950d372..7a77ef3 100644 (file)
@@ -102,8 +102,9 @@ void ArgumentCoder<ResourceError>::encode(ArgumentEncoder* encoder, const Resour
 {
     encoder->encode(resourceError.domain());
     encoder->encode(resourceError.errorCode());
-    encoder->encode(resourceError.failingURL()); 
+    encoder->encode(resourceError.failingURL());
     encoder->encode(resourceError.localizedDescription());
+    encoder->encode(resourceError.isCancellation());
 }
 
 bool ArgumentCoder<ResourceError>::decode(ArgumentDecoder* decoder, ResourceError& resourceError)
@@ -123,8 +124,13 @@ bool ArgumentCoder<ResourceError>::decode(ArgumentDecoder* decoder, ResourceErro
     String localizedDescription;
     if (!decoder->decode(localizedDescription))
         return false;
-    
+
+    bool isCancellation;
+    if (!decoder->decode(isCancellation))
+        return false;
+
     resourceError = ResourceError(domain, errorCode, failingURL, localizedDescription);
+    resourceError.setIsCancellation(isCancellation);
     return true;
 }