Specifying a version when opening a database connection prevents the connection from being garbage collected when it is no longer reachable. See https://bugs.webkit.org/show_bug.cgi?id=102458#c6
Hrm, I can't repro this any more. I'm just trying the earlier patches in https://bugs.webkit.org/show_bug.cgi?id=102458 which showed the "leak". It's possible that refactoring around upgradeneeded has cleared this out. (content_shell still shows a blocked event, but that's temporary; it looks like explicit GC isn't happening.)
The remaining work here is to add a regression test for the case that was failing in the https://bugs.webkit.org/show_bug.cgi?id=102458 that I can't repro: db = open(name, 1); // implicitly calls open(name, 1) behind the scenes db.close(); db = open(name, 1); // open w/ version - previously leaked gc(); db = open(name, 2); // no blocked event fired