Closed Bug 343107 Opened 18 years ago Closed 18 years ago

STATE_START send after STATE_STOP if download finished early.

Categories

(Core Graveyard :: File Handling, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8.1beta2

People

(Reporter: boissomag, Assigned: boissomag)

References

(Blocks 1 open bug)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060627 K-Meleon/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060627 K-Meleon/1.0

When a download is finished before the user choose the action to do, the nsITransfer object get STATE_STOP before STATE_START.


Reproducible: Always
Attached patch Patch1Splinter Review
Send STATE_START before calling SetWebProgressListener() since it sends STATE_STOP if the transfert is already finished.
Attachment #227536 - Flags: review?
You need to specifically ask someone for review by putting their email address in the "requestee" field. I recommend cbiesinger@gmx.
Hardware: PC → All
Attachment #227536 - Flags: review? → review?(cbiesinger)
I'm sure I did it the first time, maybe it didn't like it.
Comment on attachment 227536 [details] [diff] [review]
Patch1

OK, upon looking at this in detail I also don't know how this fixes leaks. But it should certainly fix the wrong order, so r=biesi. Get sr from bz or darin.
Attachment #227536 - Flags: review?(cbiesinger) → review+
(that comment was in reply to bug 276112 comment 4 and 5)
Comment on attachment 227536 [details] [diff] [review]
Patch1

perhaps the leak was introduced by firing events in the wrong order?
Attachment #227536 - Flags: superreview+
oh, maybe the STATE_STOP handler would drop the reference and thus break the cycle.
Assignee: file-handling → boissomag
fixed on trunk
Checking in uriloader/exthandler/nsExternalHelperAppService.cpp;
/cvsroot/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp,v  <--  nsExternalHelperAppService.cpp
new revision: 1.303; previous revision: 1.302
done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment on attachment 227536 [details] [diff] [review]
Patch1

this should be not much risk - it just makes sure to send START notifications before STOP ones.
Attachment #227536 - Flags: approval1.8.1?
Something for FF2 beta2.
Target Milestone: --- → mozilla1.8.1beta2
Attachment #227536 - Flags: approval1.8.1? → approval1.8.1+
Fixed on MOZILLA_1_8_BRANCH

Checking in nsExternalHelperAppService.cpp;
/cvsroot/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp,v  <--  nsExternalHelperAppService.cpp
new revision: 1.290.4.7; previous revision: 1.290.4.6
done
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: