Download progress dialog ownership model needs fixing

VERIFIED FIXED in M8

Status

SeaMonkey
UI Design
P1
normal
VERIFIED FIXED
19 years ago
13 years ago

People

(Reporter: Simon Fraser, Assigned: Bill Law)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
The ownership model used by this dialog needs review, and probably fixing,
so that the dialog and associated data are properly freed when the window
is closed.

Updated

19 years ago
OS: Mac System 8.5 → All
Priority: P3 → P1
Target Milestone: M8
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

19 years ago
You are 100% correct.  I'm working on it.
(Assignee)

Comment 2

19 years ago
Unable to test fix for this; general dialog horkage prevents "unknown content"
dialog from dispatching stream transfer component request.  Will try again
tomorrow.
(Assignee)

Comment 3

19 years ago
Still blocked.
(Assignee)

Comment 4

19 years ago
Unblocked.  Code works.  Submitting to sfraser for review, then will request
approval for checkin.
(Assignee)

Comment 5

19 years ago
Here's the fix:

Index: resources/downloadProgress.xul
===================================================================
RCS file: /cvsroot/mozilla/xpfe/components/xfer/resources/downloadProgress.xul,v

retrieving revision 1.3
diff -r1.3 downloadProgress.xul
21a22
>         onunload="onUnload()"
77a79,83
>         function onUnload() {
>             // Inform underlying C++ object.
>             data.execute.setAttribute("command","unload");
>         }
>
178a185,186
>     <html:div flex="100%">
>
237a246,247
>
>     </html:div>
cvs server: Diffing src
Index: src/nsDownloadProgressDialog.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpfe/components/xfer/src/nsDownloadProgressDialog.cpp
,v
retrieving revision 1.13
diff -r1.13 nsDownloadProgressDialog.cpp
60a61,66
> nsDownloadProgressDialog::OnUnload() {
>     // Window was closed (or is closing), release it.
>     mWindow = 0;
> }
>
> void
363a370,371
>         } else if ( cmd == "unload" ) {
>             OnUnload();
Index: src/nsDownloadProgressDialog.h
===================================================================
RCS file: /cvsroot/mozilla/xpfe/components/xfer/src/nsDownloadProgressDialog.h,v

retrieving revision 1.12
diff -r1.12 nsDownloadProgressDialog.h
133a134
>     void OnUnload();

Comment 6

19 years ago
Bill - did you ever get code review from sfraser? and if so, when?
(Assignee)

Comment 7

19 years ago
Yes, I think so (I *did* check in the fix).  I believe I changed the bug status
to fixed at around the same time.

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 8

19 years ago
cool -- then I'll mark this as verified.
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.