Closed Bug 13584 Opened 26 years ago Closed 25 years ago

MLK: 256 bytes device context impls

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: bruce, Assigned: pavlov)

References

Details

(Keywords: memory-leak)

MLK: 256 bytes leaked at 0x2cd688 * This memory was allocated from: malloc [rtlib.o] __bUiLtIn_nEw [libraptorgfx.so] __builtin_new [rtlib.o] __bUiLtIn_vEc_nEw [libraptorgfx.so] __builtin_vec_new [rtlib.o] DeviceContextImpl::DeviceContextImpl() [nsDeviceContext.cpp:62] nsDeviceContextGTK::nsDeviceContextGTK() [nsDeviceContextGTK.cpp:45] nsGfxFactoryGTK::CreateInstance(nsISupports*,const nsID&,void**) [nsGfxFactoryGTK.cpp:139] nsComponentManagerImpl::CreateInstance(const nsID&,nsISupports*,const nsID&,void**) [nsComponentManager.cpp:1218] nsComponentManager::CreateInstance(const nsID&,nsISupports*,const nsID&,void**) [nsRepository.cpp:77] nsWebShell::Init(void*,int,int,int,int,nsScrollPreference,int,int) [nsWebShell.cpp:1151] nsBrowserWindow::Init(nsIAppShell*,nsIPref*,const nsRect&,unsigned int,int) [nsBrowserWindow.cpp:1152] nsViewerApp::OpenWindow() [nsViewerApp.cpp:600] nsNativeViewerApp::Run() [nsGtkMain.cpp:41] main [nsGtkMain.cpp:116] _start [crt1.o]
Target Milestone: M14
Pavlov, I'm reading this as a one-time leak, or nearly so. Marking M14 for you to get it out of chofmann's and my hair -- move it further out if you like, but it can't be beta unless my analysis and the description of this bug are wrong or incomplete. /be
Summary: MLK: device context impls → MLK: 256 bytes device context impls
Blocks: 14516
QA Contact: beppe → gerardok
QA Contact: gerardok → claudius
Keywords: mlk
Putting on beta1 radar.
Keywords: beta1
Putting on pdt- radar for beta1.
Whiteboard: [PDT-]
Moving to m15. Pav, if you think this bug needs to be fixed for beta, as indicated by your previous tfv, you'll need to say why.
Target Milestone: M14 → M15
not beta1 at all
Keywords: beta1
Whiteboard: [PDT-]
I believe this leak is because we were leaking a webshell. What'd you think bruce?
bruce, didn't you fix this?
nope... I see that this leaks as of last night in mozilla-bin... but now it is from a docshell.
bryner did this fix. I tested it under Purify and it works for me. I've reviewed it and would be happy to check it in or bryner can. Index: nsFrameImageLoader.cpp =================================================================== RCS file: /cvsroot/mozilla/layout/base/src/nsFrameImageLoader.cpp,v retrieving revision 1.48 diff -u -r1.48 nsFrameImageLoader.cpp --- nsFrameImageLoader.cpp 2000/03/15 04:24:21 1.48 +++ nsFrameImageLoader.cpp 2000/03/18 01:36:54 @@ -155,6 +155,8 @@ aPresContext->GetTwipsToPixels(&t2p); aPresContext->GetDeviceContext(&theDC); theDC->GetCanonicalPixelScale(devScale); + NS_IF_RELEASE(theDC); + desiredWidth = NSToCoordRound((mDesiredSize.width * t2p)/devScale); desiredHeight = NSToCoordRound((mDesiredSize.height * t2p)/devScale); }
Bruce, the patch looks good to me, consider it reviewed (once more).
bryner checked this in. You can now duly accept the bug and mark it resolved.
Resolving this for Pavlov to get it off my active memory leaks radar.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
marking verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.