Closed
Bug 30641
Opened 25 years ago
Closed 24 years ago
Timer call in onStopRequest.
Categories
(Core :: Graphics: ImageLib, defect, P3)
Tracking
()
VERIFIED
FIXED
Future
People
(Reporter: gagan, Assigned: pavlov)
References
Details
Attachments
(3 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
We should cleanup the zero time timer call in OnStopRequest of ImageConsumer to
just be a simple while loop till the stream has more data.
G:
I'm not following you. More info/detail?
-P
Status: NEW → ASSIGNED
Summary: Timer call in onStopRequest. → Timer call in onStopRequest.
Target Milestone: M14
Comment 2•25 years ago
|
||
If there is more data in that method, it fires off a timer to wait 0 amount of
time and then call a method. That method ends up calling OnStopRequest again.
Why not just avoid the recursion and loop in a while statement in
OnStopRequest() to fetch the additional data?
Gagan:
Bruce:
Try as I may, I can't get a test case that hits the
breakpoint (~line 487 in gfx/src/nsImageNetContextAsync.cpp).
I have replaced the code with what makes sense to me. Would you
two give this a sanity check? And do you know how I can force
the path through this code to test it? (ie, a test case)
thnx,
P
Comment 5•25 years ago
|
||
Does this patch lose the status/return code? When does mStream get released
with the new code?
> Does this patch lose the status/return code?
Yep. and you are right. It shouldn't.
> When does mStream get released with the new code?
On error? in the code I will be putting in a few minutes. ;)
On ns_ok, I assume when ImageConsumer is destroyed.
Gagan, could you comment? I'm not yet comfortable with this part
of the code (the interface with necko).
-P
Comment 8•25 years ago
|
||
Actually ... by calling this->OnStopRequest(), you're just calling the same
method over (recursing). You should be able to just return the result of that
and get on with life. If you free the mStream after calling that, it has
already probably freed it itself just before returning the error. It'd be nice
if the code could be restructured to avoid needing recursion at all, but I don't
get what is going on well enough for that yet.
Comment 10•25 years ago
|
||
sorry about the re-post of the patch. Just a bugzilla
hiccup. I'm unclear what should be happening here, too.
Especially since I never see the code executed.
KeepPumpingStream() did call OnStopRequest() which is why
I made the recursive call.
No changes until I get more enlightenment from Gagan and the
necko crowd.
-P
Comment 11•25 years ago
|
||
The only thing using mTimer on ImageConsumer was this code, so we can get rid of
that member variable while we're here. Other than that, I guess this looks okay
to me. I don't think we need the NS_IF_RELEASE(mStream); but it won't crash the
browser or anything.
Updated•24 years ago
|
QA Contact: elig → tpreston
Comment 13•24 years ago
|
||
All pnunn bugs reassigned to Pav, who is taking over
the imglib.
Assignee: pnunn → pavlov
Status: ASSIGNED → NEW
Assignee | ||
Comment 14•24 years ago
|
||
code no longer used. marking fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•