RESOLVED FIXED 203772
Port DOMCache / DOMCacheStorage to the HTML5 event loop
https://bugs.webkit.org/show_bug.cgi?id=203772
Summary Port DOMCache / DOMCacheStorage to the HTML5 event loop
Chris Dumez
Reported 2019-11-01 17:03:18 PDT
Port DOMCache / DOMCacheStorage to the HTML5 event loop.
Attachments
Patch (20.40 KB, patch)
2019-11-01 17:04 PDT, Chris Dumez
no flags
Patch (21.01 KB, patch)
2019-11-02 12:29 PDT, Chris Dumez
no flags
Patch (21.03 KB, patch)
2019-11-02 19:59 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2019-11-01 17:04:09 PDT
Chris Dumez
Comment 2 2019-11-02 12:03:57 PDT
I suspect a bug in the WorkerEventLoop somehow. The cache-storage.https.html is passing for window but failing for workers.
Chris Dumez
Comment 3 2019-11-02 12:29:50 PDT
Chris Dumez
Comment 4 2019-11-02 12:30:22 PDT
Comment on attachment 382683 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382683&action=review > Source/WebCore/workers/WorkerEventLoop.cpp:-101 > - for (auto& task : m_tasks) Found the WorkerEventLoop bug.
Sam Weinig
Comment 5 2019-11-02 19:43:39 PDT
Comment on attachment 382683 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=382683&action=review > Source/WebCore/workers/WorkerEventLoop.cpp:101 > + auto tasks = WTFMove(m_tasks); I think the kosher way of doing this is to swap with an empty Vector<Task>. Otherwise, it leaves m_tasks in a bad (though currently kind of ok) state.
Chris Dumez
Comment 6 2019-11-02 19:49:58 PDT
(In reply to Sam Weinig from comment #5) > Comment on attachment 382683 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=382683&action=review > > > Source/WebCore/workers/WorkerEventLoop.cpp:101 > > + auto tasks = WTFMove(m_tasks); > > I think the kosher way of doing this is to swap with an empty Vector<Task>. > Otherwise, it leaves m_tasks in a bad (though currently kind of ok) state. We guarantee that our WebKit types are in OK state after moving. We even have our own Optional because of this. I don’t really mind swapping with an empty vector but it is less concise and not necessary with WebKit types. We use this pattern a lot in WebKit too, although I know not everybody likes it.
Chris Dumez
Comment 7 2019-11-02 19:59:09 PDT
WebKit Commit Bot
Comment 8 2019-11-02 20:44:36 PDT
Comment on attachment 382687 [details] Patch Clearing flags on attachment: 382687 Committed r251968: <https://trac.webkit.org/changeset/251968>
WebKit Commit Bot
Comment 9 2019-11-02 20:44:38 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2019-11-02 20:45:20 PDT
Note You need to log in before you can comment on or make changes to this bug.