Closed
Bug 495075
Opened 16 years ago
Closed 15 years ago
pUnkForRelease incorrectly assigned in nsDataObj::GetFileContents_IStream
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.2a1
People
(Reporter: rain1, Assigned: rain1)
References
Details
Attachments
(1 file)
(deleted),
patch
|
emaijala+moz
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
According to <http://msdn.microsoft.com/en-us/library/ms693491(VS.85).aspx>, assigning the same pointer to both pstm and pUnkForRelease will cause Windows to AddRef() the pointer once (for pstm) but Release() it twice (for both pstm and pUnkForRelease). This leads to random crashes in debug mode when we drag/drop and stream the data.
I've verified that the refcount goes to 0 with this patch, so there shouldn't be a memory leak.
Another approach might be for us to AddRef() once.
Attachment #379897 -
Flags: superreview?(roc)
Attachment #379897 -
Flags: review?(emaijala)
Assignee | ||
Comment 1•16 years ago
|
||
Oops -- sorry for the minimal context. The line I'm changing is this one: <http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsDataObj.cpp#2004>
Attachment #379897 -
Flags: superreview?(roc) → superreview+
Updated•16 years ago
|
Attachment #379897 -
Flags: review?(emaijala) → review+
Assignee | ||
Comment 2•15 years ago
|
||
Pushed to m-c: http://hg.mozilla.org/mozilla-central/rev/b458d73bbe83
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in
before you can comment on or make changes to this bug.
Description
•