DescriptionFix a memory leak in a unit test.
In the DeferredDeleteCanonicalCookie test, we were using an existing helper method that initialized a CanonicalCookie on the heap and put a pointer to it in a list. This makes sense for other tests because they provide that list to the CookieMonster, which takes ownership of the list.
In this case, we only needed one cookie, which we pass by reference to the CookieMonster via a method that does not take ownership. Yet, it's enough of a hassle to create the cookie that I used this method.
The result is that no-one deletes the cookie from the heap.
I extracted the existing code that prepared the cookie, so that one can create either a single cookie or a list of them.
BUG=68657
TEST=net_unittests / DeferredDeleteCanonicalCookie
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=100316
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|