WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
61920
DocumentThreadableLoader should return meaningful error codes.
https://bugs.webkit.org/show_bug.cgi?id=61920
Summary
DocumentThreadableLoader should return meaningful error codes.
Bill Budge
Reported
2011-06-02 05:16:36 PDT
ResourceError has an integer 'reason' field to specify the type of error. DocumentThreadableLoader always sets this to 0. BlobResourceHandle sets this to private error codes. Create a system of error codes to describe Resource access errors.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2011-06-02 22:48:08 PDT
I don't see the word "reason" anywhere in ResourceError.h or ResourceErrorBase.h.
Bill Budge
Comment 2
2011-06-03 05:26:58 PDT
Sorry, 'reason' is the name of the field in the WebKit::WebURLError wrapper struct. The description should say: " ResourceErrorBase has an integer 'm_errorCode' field to specify the type of error. DocumentThreadableLoader always sets this to 0. BlobResourceHandle sets this to private error codes. Create a system of error codes to describe Resource access errors."
Alexey Proskuryakov
Comment 3
2011-06-03 09:07:08 PDT
Both are correct in this regard. There is an m_domain field, and every domain owner uses whatever codes it likes. Apparently, we never needed to differentiate between errors in internal WebKit domain, so always using 0 is fine. On the other hand, ResourceErrorMac copies error code and domain from NSError - and the domain could be CFNetwork, SSL, POSIX, or something else along those lines.
Bill Budge
Comment 4
2011-06-03 10:03:40 PDT
Renaming this issue to reflect the fact that this should only affect DocumentThreadableLoader. ThreadableLoader should define integer values for types of access errors and set those on the ResourceErrors it returns, so we can return better error codes at higher levels of WebKit and Chromium.
Alexey Proskuryakov
Comment 5
2011-06-03 10:31:53 PDT
Note that DocumentThreadableLoader creates errors in internal domain. Internal means that these should never go to the client, or at least that we don't want the client to care about details. Errors that are meaningful to the client are defined in each WebKit - see e.g. WebKit/mac/Misc/WebKitErrors.h. If DocumentThreadableLoader creates errors that can be meaningful to clients, it should call WebKit to create those via FrameLoaderClient.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug