Closed
Bug 284156
Opened 19 years ago
Closed 13 years ago
SHGetMalloc API call is deprecated (in nsIconChannel.cpp)
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla6
People
(Reporter: David.R.Gardiner, Assigned: David.R.Gardiner)
References
Details
Attachments
(2 files)
2.44 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
2.06 KB,
patch
|
Details | Diff | Splinter Review |
/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp, line 265 -- hr = ::SHGetMalloc(&pMalloc); According to the MSDN documentation (http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetmalloc.asp) "This function should no longer be used. Use the CoTaskMemFree and CoTaskMemAlloc functions in its place" -dave
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #176124 -
Flags: review?(pavlov)
Comment 2•19 years ago
|
||
reading that document seems to imply that if we start using CoTaskMem* that we'll need to link against ole32.dll.... do we already do that or would it be a new dependancy? If its new, we might want to avoid doing this.
Assignee | ||
Comment 3•19 years ago
|
||
I did need to add a reference to the ole32 library, though for the number of occasions in Mozilla code that used this API call, the image library was the only one so far that I needed to do that. It is a new dependency for the image library, but I guess you have to weigh that up against the fact that Microsoft have said that the current API call we are using is deprecated, and the alternative one is supported since at least win95 so we aren't losing any platform support. Also, if I'm reading http://weblogs.asp.net/oldnewthing/archive/2004/07/05/173226.aspx correctly, it appears that we end up using OLE32 in anycase (on WinXP at least), so there's probably not much difference. -dave
Comment 4•19 years ago
|
||
At the end of the day, SHGetMalloc is an old hack to avoid loading OLE when in fact it should have been loaded, and points to OLE as soon as any other application in the system starts using the real OLE. I doubt libpr0n is actually used by anybody who doesn't have the real OLE too, so there's no real reason not to keep using this hack.
Updated•17 years ago
|
Assignee: pavlov → nobody
QA Contact: imagelib
Updated•13 years ago
|
Attachment #176124 -
Flags: review?(pavlov) → review?(joe)
Comment 5•13 years ago
|
||
Comment on attachment 176124 [details] [diff] [review] Use CoTaskMemFree to release memory This is an incredibly old patch, entirely bitrotten, but I approve of it in principle once it has been tryservered. If someone wants to update it to work and commit it, you have my blessing.
Attachment #176124 -
Flags: review?(joe) → review+
Comment 6•13 years ago
|
||
Comment 7•13 years ago
|
||
I pushed this patch to tryserver. http://tbpl.mozilla.org/?tree=Try&rev=dd52e62b0042 Test failures look to be unrelated (caused by bug 647176, bug 647570, and bug 652301).
Keywords: checkin-needed
Comment 8•13 years ago
|
||
> bug 647176 Sorry, bug 647126
Updated•13 years ago
|
Assignee: nobody → David.R.Gardiner
Comment 9•13 years ago
|
||
http://hg.mozilla.org/projects/cedar/rev/ef5eafbf53ad
Comment 10•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/ef5eafbf53ad David, thank you for the patch!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-cedar]
Target Milestone: --- → mozilla6
You need to log in
before you can comment on or make changes to this bug.
Description
•