Bug 82678

Summary: IndexedDB: Race condition causes version change transaction to commit after onblocked
Product: WebKit Reporter: Joshua Bell <jsbell>
Component: New BugsAssignee: Joshua Bell <jsbell>
Status: RESOLVED FIXED    
Severity: Normal CC: dgrogan, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 82776    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Joshua Bell 2012-03-29 17:10:23 PDT
IndexedDB: Race condition causes version change transaction to commit after onblocked
Comment 1 Joshua Bell 2012-03-29 17:15:35 PDT
Created attachment 134700 [details]
Patch
Comment 2 WebKit Review Bot 2012-03-29 17:21:14 PDT
Attachment 134700 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/ChangeLog:13:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Joshua Bell 2012-03-30 11:02:06 PDT
Comment on attachment 134700 [details]
Patch

Prematurely optimized - shouldn't look at m_readyState == DONE since cursor.continue() would reset the ready state. Need to explicitly test for blocked event.
Comment 4 Joshua Bell 2012-03-30 11:56:45 PDT
Created attachment 134852 [details]
Patch
Comment 5 Joshua Bell 2012-03-30 11:57:53 PDT
Comment on attachment 134852 [details]
Patch

Attached test verifies the patch in Chromium. The test fails in DRT - the worker is being treated as a different origin?
Comment 6 Joshua Bell 2012-03-30 13:51:00 PDT
Created attachment 134872 [details]
Patch
Comment 7 Joshua Bell 2012-03-30 13:53:00 PDT
Tracked down the DRT issue - http://webkit.org/b/82776 - nontrivial, unfortunately, so landing the test marked FAIL for now and will run it under Chromium's browser test system.

tony@, can you take a look?
Comment 8 Tony Chang 2012-03-30 13:59:56 PDT
Comment on attachment 134872 [details]
Patch

I think you need to commit an -expected.txt file otherwise the test will show up as MISSING.
Comment 9 Joshua Bell 2012-03-30 15:05:23 PDT
Created attachment 134892 [details]
Patch for landing
Comment 10 WebKit Review Bot 2012-03-30 16:05:04 PDT
Comment on attachment 134892 [details]
Patch for landing

Clearing flags on attachment: 134892

Committed r112740: <http://trac.webkit.org/changeset/112740>
Comment 11 WebKit Review Bot 2012-03-30 16:05:08 PDT
All reviewed patches have been landed.  Closing bug.