Bug 102716

Summary: IndexedDB: IDBFactory.open with version "leaks" a connection
Product: WebKit Reporter: David Grogan <dgrogan>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: alecflett, beidson, bfulgham, jsbell, sihui_liu
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 108670    

Description David Grogan 2012-11-19 14:43:38 PST
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
Comment 1 Joshua Bell 2013-02-01 14:11:31 PST
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.)
Comment 2 Joshua Bell 2013-04-02 13:43:58 PDT
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