Title: [225666] trunk/Source/WebKit
- Revision
- 225666
- Author
- commit-qu...@webkit.org
- Date
- 2017-12-07 19:00:42 -0800 (Thu, 07 Dec 2017)
Log Message
[WinCairo] Fix ResourceError handling in ArgumentCoder for wincairo webkit
https://bugs.webkit.org/show_bug.cgi?id=180483
Patch by Yousuke Kimoto <yousuke.kim...@sony.com> on 2017-12-07
Reviewed by Alex Christensen.
* Shared/curl/WebCoreArgumentCodersCurl.cpp:
(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
(IPC::ArgumentCoder<ResourceError>::decodePlatformData):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (225665 => 225666)
--- trunk/Source/WebKit/ChangeLog 2017-12-08 02:33:36 UTC (rev 225665)
+++ trunk/Source/WebKit/ChangeLog 2017-12-08 03:00:42 UTC (rev 225666)
@@ -1,3 +1,14 @@
+2017-12-07 Yousuke Kimoto <yousuke.kim...@sony.com>
+
+ [WinCairo] Fix ResourceError handling in ArgumentCoder for wincairo webkit
+ https://bugs.webkit.org/show_bug.cgi?id=180483
+
+ Reviewed by Alex Christensen.
+
+ * Shared/curl/WebCoreArgumentCodersCurl.cpp:
+ (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
+ (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
+
2017-12-07 Youenn Fablet <you...@apple.com>
StartFetch should take a ServiceWorkerIdentifier
Modified: trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp (225665 => 225666)
--- trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp 2017-12-08 02:33:36 UTC (rev 225665)
+++ trunk/Source/WebKit/Shared/curl/WebCoreArgumentCodersCurl.cpp 2017-12-08 03:00:42 UTC (rev 225666)
@@ -56,12 +56,52 @@
return true;
}
-void ArgumentCoder<ResourceError>::encodePlatformData(Encoder&, const ResourceError&)
+void ArgumentCoder<ResourceError>::encodePlatformData(Encoder& encoder, const ResourceError& resourceError)
{
+ encoder.encodeEnum(resourceError.type());
+ if (resourceError.isNull())
+ return;
+
+ encoder << resourceError.domain();
+ encoder << resourceError.errorCode();
+ encoder << resourceError.failingURL().string();
+ encoder << resourceError.localizedDescription();
+ encoder << resourceError.sslErrors();
}
-bool ArgumentCoder<ResourceError>::decodePlatformData(Decoder&, ResourceError&)
+bool ArgumentCoder<ResourceError>::decodePlatformData(Decoder& decoder, ResourceError& resourceError)
{
+ ResourceErrorBase::Type errorType;
+ if (!decoder.decodeEnum(errorType))
+ return false;
+ if (errorType == ResourceErrorBase::Type::Null) {
+ resourceError = { };
+ return true;
+ }
+
+ String domain;
+ if (!decoder.decode(domain))
+ return false;
+
+ int errorCode;
+ if (!decoder.decode(errorCode))
+ return false;
+
+ String failingURL;
+ if (!decoder.decode(failingURL))
+ return false;
+
+ String localizedDescription;
+ if (!decoder.decode(localizedDescription))
+ return false;
+
+ unsigned sslErrors;
+ if (!decoder.decode(sslErrors))
+ return false;
+
+ resourceError = ResourceError(domain, errorCode, URL(URL(), failingURL), localizedDescription, errorType);
+ resourceError.setSslErrors(sslErrors);
+
return true;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes