RESOLVED FIXED Bug 77114
IndexedDB: WebCore::IDBKey objects are leaked
https://bugs.webkit.org/show_bug.cgi?id=77114
Summary IndexedDB: WebCore::IDBKey objects are leaked
Joshua Bell
Reported 2012-01-26 10:15:49 PST
IndexedDB: WebCore::IDBKey objects are leaked
Attachments
Patch (2.53 KB, patch)
2012-01-26 10:16 PST, Joshua Bell
no flags
Patch (2.54 KB, patch)
2012-01-26 11:04 PST, Joshua Bell
no flags
Joshua Bell
Comment 1 2012-01-26 10:16:31 PST
Joshua Bell
Comment 2 2012-01-26 10:17:42 PST
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?
David Grogan
Comment 3 2012-01-26 10:38:44 PST
Comment on attachment 124135 [details] Patch Looks promising. You'll have to get rid of the No new tests. (OOPS!) line.
David Grogan
Comment 4 2012-01-26 10:42:52 PST
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?
Joshua Bell
Comment 5 2012-01-26 10:48:24 PST
(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?
David Grogan
Comment 6 2012-01-26 10:54:36 PST
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.
Joshua Bell
Comment 7 2012-01-26 11:04:48 PST
Joshua Bell
Comment 8 2012-01-26 11:07:52 PST
tony@ - can you r? Again, this seems simple enough that I feel like I'm missing something.
Tony Chang
Comment 9 2012-01-26 11:12:24 PST
Comment on attachment 124149 [details] Patch This looks correct. There are other examples of this pattern in the code (e.g., SecurityOrigin::create).
Joshua Bell
Comment 10 2012-01-26 11:15:55 PST
I'll verify this with valgrind if possible before landing it.
Joshua Bell
Comment 11 2012-01-26 15:29:41 PST
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.
WebKit Review Bot
Comment 12 2012-01-26 16:07:27 PST
Comment on attachment 124149 [details] Patch Clearing flags on attachment: 124149 Committed r106059: <http://trac.webkit.org/changeset/106059>
WebKit Review Bot
Comment 13 2012-01-26 16:07:31 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.