Closed
Bug 475344
Opened 16 years ago
Closed 16 years ago
Need a cancellation code to indicate successful load from cache
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
People
(Reporter: neil, Assigned: neil)
Details
Attachments
(1 file)
6.10 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Currently the code NS_IMAGELIB_ERROR_LOAD_ABORTED is handled specially in nsDocumentViewer to fire onload handlers even though the channel was cancelled (in this case because the image was in the image cache). The XUL prototype cache could do with this behaviour too; it currently works around it by providing a dummy channel that doesn't need to be aborted. See bug 206691.
Comment 1•16 years ago
|
||
I don't really like putting an error code into nsNetError that's not used by necko in any way. I'm not really sure what a better place would be though :/
uriloader might be low enough in the dependency tree, and it also doesn't seem entirely inappropriate to put it there.
Assignee | ||
Comment 2•16 years ago
|
||
OK, so my #define now looks like this:
>diff uriloader/base/nsURILoader.h
>@@ 107,0 107,6 @@
>+
>+/**
>+ * Used when a load can be satisfied from a cache of decoded data,
>+ * rather than having to load from the original source or the network cache.
>+ */
>+#define NS_ERROR_something NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_URILOADER, something /*33?*/)
![]() |
||
Comment 3•16 years ago
|
||
nsURILoader.h is not exported. You might want to just create a new header that is and put this in it.
We could call it NS_ERROR_PARSED_DATA_CACHED perhaps?
Assignee | ||
Comment 4•16 years ago
|
||
Not sure who else I can ask for review here :-(
![]() |
||
Updated•16 years ago
|
Attachment #361485 -
Flags: superreview+
Attachment #361485 -
Flags: review?(bzbarsky)
Attachment #361485 -
Flags: review+
![]() |
||
Comment 5•16 years ago
|
||
Comment on attachment 361485 [details] [diff] [review]
Proposed patch
Yeah, this looks fine.
Assignee | ||
Comment 6•16 years ago
|
||
Pushed changeset 1e74329357e3 to mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #361485 -
Flags: approval1.9.1?
Comment on attachment 361485 [details] [diff] [review]
Proposed patch
I need this on branch for the media cache, which is P1...
Attachment #361485 -
Flags: approval1.9.1?
Comment on attachment 361485 [details] [diff] [review]
Proposed patch
Actually, let me just cancel this request and use ImageErrors.h on branch.
You need to log in
before you can comment on or make changes to this bug.
Description
•