RESOLVED FIXED 53565
Refactor IDBRequest and IDBTransaction a bit
https://bugs.webkit.org/show_bug.cgi?id=53565
Summary Refactor IDBRequest and IDBTransaction a bit
Jeremy Orlow
Reported 2011-02-01 18:11:40 PST
Refactor IDBRequest and IDBTransaction a bit
Attachments
Patch (21.86 KB, patch)
2011-02-01 18:14 PST, Jeremy Orlow
no flags
Patch (21.96 KB, patch)
2011-02-01 19:58 PST, Jeremy Orlow
no flags
Patch (21.77 KB, patch)
2011-02-03 17:27 PST, Jeremy Orlow
no flags
Patch (21.98 KB, patch)
2011-02-03 17:29 PST, Jeremy Orlow
japhet: review+
Jeremy Orlow
Comment 1 2011-02-01 18:14:17 PST
Jeremy Orlow
Comment 2 2011-02-01 18:15:26 PST
Mihai, this modifies EventQueue so I added you.
Andrei Popescu
Comment 3 2011-02-01 18:44:30 PST
Looks great. > if (m_transaction) > IDBPendingTransactionMonitor::removePendingTransaction(m_transaction.get()); Not sure I fully understand this. When can m_transaction be 0? Seems like this wasn't possible before?
Jeremy Orlow
Comment 4 2011-02-01 18:49:57 PST
(In reply to comment #3) > Looks great. > > > if (m_transaction) > > IDBPendingTransactionMonitor::removePendingTransaction(m_transaction.get()); > > Not sure I fully understand this. When can m_transaction be 0? Seems like this wasn't possible before? You're right. That was a mistake.
Jeremy Orlow
Comment 5 2011-02-01 19:58:48 PST
Mihai Parparita
Comment 6 2011-02-02 16:22:38 PST
Comment on attachment 80877 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80877&action=review > Source/WebCore/dom/EventQueue.cpp:84 > + eventTarget->dispatchEvent(event); This is the same as the initial toNode() branch. I think you should be able to just remove that and get the same behavior (turning this into if (..toDOMWindow) {..} else {...}). > Source/WebCore/storage/IDBRequest.cpp:161 > + ASSERT(scriptExecutionContext()->isDocument()); I thought the IndexedDB API was going to be available from workers too.
Jeremy Orlow
Comment 7 2011-02-02 16:42:09 PST
Comment on attachment 80877 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80877&action=review >> Source/WebCore/dom/EventQueue.cpp:84 >> + eventTarget->dispatchEvent(event); > > This is the same as the initial toNode() branch. I think you should be able to just remove that and get the same behavior (turning this into if (..toDOMWindow) {..} else {...}). Will do. >> Source/WebCore/storage/IDBRequest.cpp:161 >> + ASSERT(scriptExecutionContext()->isDocument()); > > I thought the IndexedDB API was going to be available from workers too. It will be. But I think this is the best way to go for now. We'll re-evaluate when we add to workers (which is probably at least a month or two away).
Jeremy Orlow
Comment 8 2011-02-03 17:27:49 PST
Jeremy Orlow
Comment 9 2011-02-03 17:29:53 PST
Jeremy Orlow
Comment 10 2011-02-03 17:30:56 PST
I rebased this patch and fixed the issue Mihai pointed out. Nate, can you please review?
WebKit Review Bot
Comment 11 2011-02-03 20:56:17 PST
WebKit Review Bot
Comment 12 2011-02-03 23:18:32 PST
Nate Chapin
Comment 13 2011-02-04 11:32:51 PST
Comment on attachment 81156 [details] Patch I like it. :)
Jeremy Orlow
Comment 14 2011-02-04 11:53:04 PST
WebKit Review Bot
Comment 15 2011-02-04 12:02:07 PST
http://trac.webkit.org/changeset/77650 might have broken Chromium Linux Release
Note You need to log in before you can comment on or make changes to this bug.