IndexedDB: WebCore::IDBKey objects are leaked
Created attachment 124135 [details] Patch
Tossing the patch up to let the bots have at it. On the one hand this looks like a no-brainer. On the other hand, it can't be this easy, can it?
Comment on attachment 124135 [details] Patch Looks promising. You'll have to get rid of the No new tests. (OOPS!) line.
Comment on attachment 124135 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=124135&action=review > Source/WebCore/storage/IDBKey.h:69 > + RefPtr<IDBKey> idbKey = adoptRef(new IDBKey()); Though, could you change these to use the common IDBKey::create() pattern?
(In reply to comment #4) > (From update of attachment 124135 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=124135&action=review > > > Source/WebCore/storage/IDBKey.h:69 > > + RefPtr<IDBKey> idbKey = adoptRef(new IDBKey()); > > Though, could you change these to use the common IDBKey::create() pattern? Do you mean, change these (where possible) to IDBKey::create(<Type>) with various type overloads, or adding a private static IDBKey::create() that the current createXXX() methods are changed to call?
Comment on attachment 124135 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=124135&action=review >>> Source/WebCore/storage/IDBKey.h:69 >>> + RefPtr<IDBKey> idbKey = adoptRef(new IDBKey()); >> >> Though, could you change these to use the common IDBKey::create() pattern? > > Do you mean, change these (where possible) to IDBKey::create(<Type>) with various type overloads, or adding a private static IDBKey::create() that the current createXXX() methods are changed to call? I had meant the second, but I hadn't noticed that these were already createXXX methods. So an IDBKey::create() probably doesn't add much. Request retracted.
Created attachment 124149 [details] Patch
tony@ - can you r? Again, this seems simple enough that I feel like I'm missing something.
Comment on attachment 124149 [details] Patch This looks correct. There are other examples of this pattern in the code (e.g., SecurityOrigin::create).
I'll verify this with valgrind if possible before landing it.
Running under valgrind: sh tools/valgrind/chrome_tests.sh -t ui --gtest_filter='IndexedDBUILayoutTest.LayoutTests' * Without this patch it reports 11 suppressions of bug_109463 http://crbug.com/109463 * With this patch it reports 0 suppressions of bug_109463 I'm calling that good.
Comment on attachment 124149 [details] Patch Clearing flags on attachment: 124149 Committed r106059: <http://trac.webkit.org/changeset/106059>
All reviewed patches have been landed. Closing bug.