Closed
Bug 233299
Opened 21 years ago
Closed 21 years ago
nsIFilePicker.show is not reentrant
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
References
()
Details
Attachments
(2 obsolete files)
I have code which tries to write to a file when it gets an event.
to write to the file it pops up a filepicker and asks for a filename.
unfortunately the code can get an event at some time during the filepicker show
method's lifespan.
a variant of this exists on linux and was reported to me (i believe by doron).
Anyway, here's the windows code:
90 NS_IMETHODIMP nsFilePicker::ShowW(PRInt16 *aReturnVal)
115 mUnicodeFile.SetLength(0);
137 mUnicodeFile.Append(fileBuffer);
280 mUnicodeFile.Append(fileBuffer);
The case I care about goes through 280 (file picker) instead of 137 (directory
picker), but i believe the problem can happen in both places.
Anyway, the output is:
c:\\first.extc:\\second2.ens
For the time being, I'd like the second show() to clobber the first show.
This is done by changing Append to Assign. - There's no justification for Append.
Attachment #140760 -
Flags: review?(neil.parkwaycc.co.uk)
Updated•21 years ago
|
Attachment #140760 -
Flags: review?(neil.parkwaycc.co.uk) → review+
![]() |
||
Comment 2•21 years ago
|
||
Comment on attachment 140760 [details] [diff] [review]
patch
sr=bzbarsky
Attachment #140760 -
Flags: superreview+
windows checked in
Attachment #140760 -
Attachment is obsolete: true
Attachment #141036 -
Flags: superreview?(bzbarsky)
Attachment #141036 -
Flags: review?(mkaply)
Comment 4•21 years ago
|
||
Comment on attachment 141036 [details] [diff] [review]
os/2, beos
r=mkaply
Attachment #141036 -
Flags: review?(mkaply) → review+
![]() |
||
Comment 5•21 years ago
|
||
Comment on attachment 141036 [details] [diff] [review]
os/2, beos
sr=bzbarsky
Attachment #141036 -
Flags: superreview?(bzbarsky) → superreview+
Comment on attachment 141036 [details] [diff] [review]
os/2, beos
i'm not following bugs (work priorities and no real home network) so if someone
approves this, i'd appreciate it if they checked it in.
risk: minimal.
if no one checks this in before branch, then someone should probably fix
'firts' to 'first' ...
Attachment #141036 -
Flags: approval1.7a?
Comment 7•21 years ago
|
||
Comment on attachment 141036 [details] [diff] [review]
os/2, beos
a=dveditz for 1.7a
Attachment #141036 -
Flags: approval1.7a? → approval1.7a+
Attachment #141036 -
Attachment is obsolete: true
Comment 8•21 years ago
|
||
(timeless checked the second patch here in 02/15/2004 21:31, making the
firts->first change)
Comment 9•21 years ago
|
||
marking fixed
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•