memory leakage in mochitest while firing touch start event without a corresponding touch end event




5 years ago
4 years ago


(Reporter: schien, Unassigned)


Firefox Tracking Flags

(Not tracked)


(Whiteboard: [MemShrink:P3])


(2 attachments)

Created attachment 690662 [details]
minimal test case to trigger memory leakage

In mochitest, firing a touch start event using |synthsizeTouch| will cause memory leakage. Firing a corresponding touch end event will make this memory leakage disappear.
Created attachment 690663 [details]
BloatView of the test case
Whiteboard: [MemShrink]
Assignee: nobody → continuation
Whiteboard: [MemShrink] → [MemShrink:P1]
According to the CC log, this is being kept alive by an anonymous div with a missing reference:

0x12b23ca80 [FragmentOrElement (xhtml) div class='anonymous-div' ...]
    --[mAttrsAndChildren[i]]-> 0x12b23cb00 [nsGenericDOMDataNode]
    --[mNodeInfo]-> 0x1260a0098 [nsNodeInfo ([none]) #text]
    --[mOwnerManager]-> 0x11f0a4d40 [nsNodeInfoManager]
    --[mDocument]-> 0x11f0f1000 [nsDocument normal (xhtml) ...]
    --[mChildren[i]]-> 0x1299ecf80 [FragmentOrElement (xhtml) html ...]
    --[mAttrsAndChildren[i]]-> 0x129c54af0 [FragmentOrElement (xhtml) body ]
    --[mAttrsAndChildren[i]]-> 0x128b77d70 [FragmentOrElement (xhtml) a ...]
    --[[via hash] mListenerManager]-> 0x128ba0700 [nsEventListenerManager]
    --[mListeners[i]]-> 0x12b502c40 [nsJSEventListener handlerName=onclick]
    --[mHandler.Ptr()]-> 0x12b2f6d80 [CallbackFunction]
    --[mCallable]-> 0x1194909c0 [JS Object (Function - partial/<)]
    --[fun_callscope]-> 0x119490980 [JS Object (Call)]
    --[parent, **UNKNOWN SLOT 0**]-> 0x11944f060 [JS Object (Window)]
    --[xpc_GetJSPrivate(obj)]-> 0x11f92cf90 [XPCWrappedNative (Window)]
    --[mIdentity]-> 0x129632888 [nsGlobalWindow #12]

    Root 0x12b23ca80 is a ref counted object with 1 unknown edge(s).
    known edges:
       0x12b23cb00 [nsGenericDOMDataNode] --[GetParent()]-> 0x12b23ca80

where ... is http://mochi.test:8888/tests/browser/base/content/test/touchleak.html?autorun=1&closeWhenDone=1&logFile=%2FUsers%2Famccreight%2Fmz%2Fcent%2Fobj-dbg%2Fmochitest-plain.log&fileLevel=INFO&consoleLevel=INFO&failureFile=/Users/amccreight/mz/cent/obj-dbg/_tests/testing/mochitest/makefailures.json

Comment 3

5 years ago
I don't think this is too serious issue. We keep touches alive in presshell, but evict the old
touches ones we get the start of a new touch session.
Tests using DOMWindowUtils may do something hacky, like not dispatch touchend.
Olli, do you think this is WONTFIX then?

Comment 5

4 years ago
This should be fixed, but isn't anything critical, as far as I see.
Okay, we can retriage this at our next MemShrink meeting.
Assignee: continuation → nobody
Whiteboard: [MemShrink:P1] → [MemShrink]
Whiteboard: [MemShrink] → [MemShrink:P3]
You need to log in before you can comment on or make changes to this bug.