STATE_START send after STATE_STOP if download finished early.

RESOLVED FIXED in mozilla1.8.1beta2

Status

Core Graveyard
File Handling
RESOLVED FIXED
12 years ago
2 years ago

People

(Reporter: Dorian, Assigned: Dorian)

Tracking

(Blocks: 1 bug, {fixed1.8.1})

Trunk
mozilla1.8.1beta2
fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

2.20 KB, patch
Biesinger
: review+
Darin Fisher
: superreview+
Mike Schroepfer
: approval1.8.1+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
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
(Assignee)

Comment 1

12 years ago
Created attachment 227536 [details] [diff] [review]
Patch1

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
(Assignee)

Updated

12 years ago
Attachment #227536 - Flags: review? → review?(cbiesinger)
(Assignee)

Comment 3

12 years ago
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 6

12 years ago
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
Last Resolved: 12 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?

Comment 10

12 years ago
Something for FF2 beta2.
Target Milestone: --- → mozilla1.8.1beta2

Updated

12 years ago
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.