Bug 78841

Summary: WebDatabase.closeDatabaseImmediately can crash.
Product: WebKit Reporter: Michael Nordman <michaeln@google.com>
Component: WebCore Misc.Assignee: Michael Nordman <michaeln@google.com>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot@gmail.com
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
nuke
none
nuke none

Description From 2012-02-16 14:06:57 PST
WebDatabase.closeDatabaseImmediately can crash and currently leaves affected database instanced in an odd state where transaction() calls never complete. Fixing this is part of http://code.google.com/p/chromium/issues/detail?id=98939
------- Comment #1 From 2012-02-16 14:11:57 PST -------
Here's the chromium side CL waiting on this patch.
https://chromiumcodereview.appspot.com/9371008/
------- Comment #2 From 2012-02-16 14:27:01 PST -------
Created an attachment (id=127443) [details]
nuke
------- Comment #3 From 2012-02-16 15:00:24 PST -------
(From update of attachment 127443 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=127443&action=review

> Source/WebCore/storage/Database.cpp:289
> +            scriptExecutionContext()->postTask(createCallbackTask(&callTransactionErrorCallback, errorCallback, error));

error.release()

> Source/WebCore/storage/chromium/DatabaseTrackerChromium.cpp:239
> +    // First we have to confirm the 'database' is still in our colleciton.

colleciton sp
------- Comment #4 From 2012-02-16 15:13:58 PST -------
Created an attachment (id=127454) [details]
nuke

made both changes and added additional comment in the change log about a ref cycle that no longer gets created
------- Comment #5 From 2012-02-16 16:52:48 PST -------
(From update of attachment 127454 [details])
Rejecting attachment 127454 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:

patching file Source/WebCore/storage/chromium/DatabaseTrackerChromium.cpp
patching file Source/Webkit/chromium/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/Webkit/chromium/src/WebDatabase.cpp
Hunk #1 FAILED at 122.
1 out of 1 hunk FAILED -- saving rejects to file Source/Webkit/chromium/src/WebDatabase.cpp.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'David Levin']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/11542164
------- Comment #6 From 2012-02-16 19:19:54 PST -------
Committed r108015: <http://trac.webkit.org/changeset/108015>