Closed Bug 118647 Opened 23 years ago Closed 23 years ago

Memory leak of 52 bytes from 1 block allocated in nsOutlinerBodyFrame::CheckVerticalOverflow

Categories

(Core :: XUL, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: stephend, Assigned: janv)

Details

(Keywords: memory-leak, Whiteboard: [Have fix])

Attachments

(1 file)

I'm hoping that this isn't a bogus stack.

Summary: Memory leak of 52 bytes from 1 block allocated in 
nsOutlinerBodyFrame::CheckVerticalOverflow

Build ID: Latest trunk win32 bits running under Purify on Windows 2000.

Steps to Repro:

1.  I just launched -mail, did a CTRL-M (new compose window).
2.  Typed stephend@netscape.com into the recipient field, attached a file, and 
sent (subject was 'test).
3.  Closed the app (which consisted of the single 3-pane window).

Looking at the stack, this may be mail/news' bug.  CC:ing the crew.

[W] MLK: Memory leak of 52 bytes from 1 block allocated in 
nsOutlinerBodyFrame::CheckVerticalOverflow(void)
    Distribution of leaked blocks
    Allocation location
    new(UINT)      [MSVCRT.DLL]
    nsOutlinerBodyFrame::CheckVerticalOverflow(void) 
[nsOutlinerBodyFrame.cpp:854]
      }
    
      if (verticalOverflowChanged) {
 =>     nsScrollPortEvent* event = new nsScrollPortEvent();
        event->eventStructType = NS_SCROLLPORT_EVENT;
        event->widget = nsnull;
        event->orient = nsScrollPortEvent::vertical;
    nsOutlinerBodyFrame::RowCountChanged(int,int) [nsOutlinerBodyFrame.cpp:1495]
      }
    
      InvalidateScrollbar();
 =>   CheckVerticalOverflow();
      return NS_OK;
    }
    
    nsOutlinerBoxObject::RowCountChanged(int,int) [nsOutlinerBoxObject.cpp:383]
    {
      nsIOutlinerBoxObject* body = GetOutlinerBody();
      if (body)
 =>     return body->RowCountChanged(aIndex, aDelta);
          return NS_OK;
        }
        
    nsMsgDBView::Close(void) [nsMsgDBView.cpp:1544]
        
          // this needs to happen after we remove all the keys, since 
RowCountChanged() will call our GetRowCount()
          if (mOutliner)
     =>     mOutliner->RowCountChanged(0, -oldSize);
        
          ClearHdrCache();
          if (m_db)
    nsMsgThreadedDBView::Close(void) [nsMsgThreadedDBView.cpp:97]
        }
        
        NS_IMETHODIMP nsMsgThreadedDBView::Close()
     => {
          return nsMsgDBView::Close();
        }
        
    ???            [ip=0x0a61be20]
    XPTC_InvokeByIndex [xptcinvoke.cpp:105]
    XPCWrappedNative::CallMethod(XPCCallContext&,CallMode::XPCWrappedNative) 
[xpcwrappednative.cpp:2009]
    XPC_WN_CallMethod(JSContext *,JSObject *,UINT,long *,long *) 
[xpcwrappednativejsops.cpp:1266]
    js_Invoke      [jsinterp.c:832]
    js_Interpret   [jsinterp.c:2798]
    js_Invoke      [jsinterp.c:849]
    js_InternalInvoke [jsinterp.c:924]
    JS_CallFunctionValue [jsapi.c:3405]
    nsJSContext::CallEventHandler(void *,void *,UINT,void *,int *,int) 
[nsJSEnvironment.cpp:1011]
    nsJSEventListener::HandleEvent(nsIDOMEvent *) [nsJSEventListener.cpp:180]
    nsEventListenerManager::HandleEventSubType(nsListenerStruct *,nsIDOMEvent 
*,nsIDOMEventTarget *,UINT,UINT) [nsEventListenerManager.cpp:1205]
    nsEventListenerManager::HandleEvent(nsIPresContext *,nsEvent *,nsIDOMEvent 
* *,nsIDOMEventTarget *,UINT,nsEventStatus *) [nsEventListenerManager.cpp:1878]
    GlobalWindowImpl::HandleDOMEvent(nsIPresContext *,nsEvent *,nsIDOMEvent * 
*,UINT,nsEventStatus *) [nsGlobalWindow.cpp:637]
Looks like my checkin.
I'll have to find out why the overflow event is not destroyed.
-> varga@utcru.sk
Assignee: jaggernaut → varga
I guess we should handle overflow events in two ways:
1. If we are in reflow, post dom event asynchronously through presentation shell
2. Otherwise handle event synchronously
Status: NEW → ASSIGNED
Attached patch patchSplinter Review
stephend, could you run purify with attached patch ?
yes, that fixes the leak (at least for Purify).
Comment on attachment 64180 [details] [diff] [review]
patch

r=bryner
Attachment #64180 - Flags: review+
Keywords: mailtrack, nsbeta1
Whiteboard: [Have fix]
fixed along with bug 116855 
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: