Bug 106732

Summary: [JSC] IndexedDB: Deactivate new transactions when exiting worker script context
Product: WebKit Reporter: Michael Pruett <michael>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: adamk, alecflett, benjamin, bfulgham, dimich, ggaren, gyuyoung.kim, jsbell, mrobinson, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107194, 111171    
Attachments:
Description Flags
Patch
none
Patch buildbot: commit-queue-

Michael Pruett
Reported 2013-01-12 17:28:21 PST
When exiting the main thread script state, IDBPendingTransactionMonitor::deactivateNewTransactions() is called (JSMainThreadExecState::didLeaveScriptContext() in Source/WebCore/bindings/js/JSMainThreadExecState.cpp). The same call should be made when exiting a worker script context as well. Currently these two tests fail on JSC because of this problem: storage/indexeddb/pending-activity-workers.html storage/indexeddb/transaction-complete-workers.html
Attachments
Patch (1.98 KB, patch)
2013-01-13 13:51 PST, Michael Pruett
no flags
Patch (21.44 KB, patch)
2013-01-15 11:53 PST, Michael Pruett
buildbot: commit-queue-
Michael Pruett
Comment 1 2013-01-13 13:51:12 PST
Michael Pruett
Comment 2 2013-01-15 11:53:34 PST
Build Bot
Comment 3 2013-01-15 12:44:17 PST
Geoffrey Garen
Comment 4 2013-01-15 14:25:43 PST
> "the flag be set to false when control returns to the event loop" I think you've missed a lot of cases. JSLockHolder is the object we use to indicate entry to the JS engine, and there are 218 instances of it in the WebKit project. Is there a simpler bottleneck for catching returns to the runloop? Hooking into shared timer might get you most of the way there.
Alec Flett
Comment 5 2013-03-07 14:45:09 PST
I have a fix for the inspector, for V8 - it uses V8RecursionScope. Not sure if/when the JSC stuff is going in though.
Adam Klein
Comment 6 2013-03-07 17:32:07 PST
(In reply to comment #4) > > "the flag be set to false when control returns to the event loop" > > I think you've missed a lot of cases. JSLockHolder is the object we use to indicate entry to the JS engine, and there are 218 instances of it in the WebKit project. > > Is there a simpler bottleneck for catching returns to the runloop? Hooking into shared timer might get you most of the way there. FWIW, if you do find a way to hook a return to the run loop, that would also provide a fix for bug 78290.
Brent Fulgham
Comment 7 2022-07-11 15:00:35 PDT
These tests appear to work properly in modern WebKit (as of 2022), so this seems to have progressed through other IndexedDB work.
Note You need to log in before you can comment on or make changes to this bug.