Closed Bug 963878 Opened 6 years ago Closed 2 years ago
Leak with large text node containing LRO
1. Run Firefox with XPCOM_MEM_LEAK_LOG=2 2. Load the testcase 3. Quit Firefox Result: trace-refcnt reports that Firefox leaked an "nsTArray_base" object. This is a regression from bug 955957.
I don't think bug 955957 has actually introduced a new leak, as it didn't change anything about the ownership or lifetime of gfxSkipChars; however, the old implementation was not tracked by the leak-checking code, so we didn't notice. Now that it has an nsTArray member, suddenly it becomes visible. I believe the object being leaked here is the static const variable emptySkipChars from http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsTextFrame.cpp#2617. As a static, it gets created (including its nsTArray member) the first time we hit this particular codepath (if at all), and then never gets deleted. It appears that BuildTextRun() is failing to construct the necessary textrun for a frame in this example, but I haven't tracked down why that's happening or whether it will result in other problems (though the "this is bad" comment at http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsTextFrame.cpp#2615 is worrying). The apparent leak is simply a side-effect of this failure.
No longer reproduces on trunk.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/086fe27b8650 Add crashtest. r=me
You need to log in before you can comment on or make changes to this bug.