Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 0ba9e6c. rdar://problem/111161160
WebPage_LoadRequest IPC fails decoding in PingDuoDuo app https://bugs.webkit.org/show_bug.cgi?id=258486 rdar://111161160 Reviewed by Tim Horton. WebPage_LoadRequest IPC was failing decoding in PingDuoDuo app. The issue was due to getting a WKSecureCodingURLWrapper instead of a NSURL when decoding the baseURL of a NSURL. I am not sure how we ended up in this situation but I made the bug go away by simplifying the code. The coder used to encode the URL in two parts: 1. The baseURL 2. The bytes from the URL's relative string Then it would decode the URL in 2 parts: 1. The baseURL 2. The bytes from the URL's relative string It would then call CFURLCreateAbsoluteURLWithBytes() with those 2 parts, which would result in an *absolute* URL. The information about baseURL / relative string would be lost. As a result, I have decided to simply encode the URL in one part, the absolute URL bytes. The decoding results ends up being the same (an absolute URL). It simplifies both coding and decoding and makes the bug go away since it was about decoding baseURLs. * Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm: (-[WKSecureCodingURLWrapper encodeWithCoder:]): (-[WKSecureCodingURLWrapper initWithCoder:]): * Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm: Canonical link: https://commits.webkit.org/265529@main Canonical link: https://commits.webkit.org/265500.2@safari-7616.1.21-branch
- Loading branch information