RESOLVED FIXED 183303
Share common WebError implementation
https://bugs.webkit.org/show_bug.cgi?id=183303
Summary Share common WebError implementation
Don Olmstead
Reported 2018-03-02 14:49:16 PST
We wrote out an implementation of WebErrorsWin.cpp but its the same as GTK.
Attachments
Patch (5.64 KB, patch)
2018-03-02 14:52 PST, Don Olmstead
no flags
Don Olmstead
Comment 1 2018-03-02 14:52:35 PST
Don Olmstead
Comment 2 2018-03-02 14:56:15 PST
Comment on attachment 334932 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=334932&action=review Here's one potential approach to this. I don't care that much for PLATFORM checks but I'm not seeing any Generic files within WebKit so I'm not sure about the policy here. > Source/WebKit/Shared/WebErrors.cpp:91 > +#if !PLATFORM(COCOA) > +ResourceError cancelledError(const ResourceRequest& request) > +{ > + return ResourceError(API::Error::webKitNetworkErrorDomain(), API::Error::Network::Cancelled, request.url(), WEB_UI_STRING("Load request cancelled", "Load request cancelled")); > +} > + > +ResourceError fileDoesNotExistError(const ResourceResponse& response) > +{ > + return ResourceError(API::Error::webKitNetworkErrorDomain(), API::Error::Network::FileDoesNotExist, response.url(), WEB_UI_STRING("File does not exist", "The requested file doesn't exist")); > +} > +#endif Cocoa has its own implementation of this > Source/WebKit/Shared/glib/WebErrorsGlib.cpp:-50 > -ResourceError cancelledError(const ResourceRequest& request) > -{ > - return ResourceError(API::Error::webKitNetworkErrorDomain(), API::Error::Network::Cancelled, request.url(), WEB_UI_STRING("Load request cancelled", "Load request cancelled")); > -} > - > -ResourceError fileDoesNotExistError(const ResourceResponse& response) > -{ > - return ResourceError(API::Error::webKitNetworkErrorDomain(), API::Error::Network::FileDoesNotExist, response.url(), WEB_UI_STRING("File does not exist", "The requested file doesn't exist")); > -} > - > -} // namespace WebKit Nothing about this file is really glib specific.
Michael Catanzaro
Comment 3 2018-03-02 15:03:18 PST
Good!
WebKit Commit Bot
Comment 4 2018-03-02 16:07:38 PST
Comment on attachment 334932 [details] Patch Clearing flags on attachment: 334932 Committed r229193: <https://trac.webkit.org/changeset/229193>
WebKit Commit Bot
Comment 5 2018-03-02 16:07:39 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-03-02 16:08:30 PST
Note You need to log in before you can comment on or make changes to this bug.