Closed Bug 1521223 Opened 9 months ago Closed 9 months ago

Add an interface to deliberately leak an object


(Core :: XPCOM, enhancement)

Not set



Tracking Status
firefox66 --- fixed


(Reporter: mccr8, Assigned: mccr8)



(2 files)

It would be good if we had a mochitest unit test for leak checking, to cover the case where an object leaks. Right now there is one, but it uses a fake leak log. We need some interface that can be called from privileged JS that can leak an object that will show up in the leak log. The object it leaks shouldn't be used otherwise.

This is needed to test various leak checking harnesses.

In the second patch, I updated the mochitest test to actually leak, using the API I added in part 1, but the status and level reported are "warning" instead of some kind of failure like the ASan one. Is that expected? It seems weird, but I'm not at all familiar with how this works.

Flags: needinfo?(ahal)

ahal explained in the review comment that "warning" means "orange". I'm too used to thinking of compiler warnings, which are non-fatal...

Flags: needinfo?(ahal)
Pushed by
part 1 - Add an API to deliberately leak an object. r=froydnj
part 2 - Update the leakcheck test to work on a real leak log. r=ahal
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.