Summary: | Refactor IDBRequest and IDBTransaction a bit | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jeremy Orlow <jorlow> | ||||||||||
Component: | New Bugs | Assignee: | Jeremy Orlow <jorlow> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | abarth, andreip, dglazkov, dgrogan, eric, hans, japhet, mihaip, webkit.review.bot | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Other | ||||||||||||
OS: | OS X 10.5 | ||||||||||||
Attachments: |
|
Description
Jeremy Orlow
2011-02-01 18:11:40 PST
Created attachment 80868 [details]
Patch
Mihai, this modifies EventQueue so I added you. 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?
(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. Created attachment 80877 [details]
Patch
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. 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). Created attachment 81155 [details]
Patch
Created attachment 81156 [details]
Patch
I rebased this patch and fixed the issue Mihai pointed out. Nate, can you please review? Attachment 81156 [details] did not build on chromium: Build output: http://queues.webkit.org/results/7692729 Attachment 81156 [details] did not build on chromium: Build output: http://queues.webkit.org/results/7692789 Comment on attachment 81156 [details]
Patch
I like it. :)
http://trac.webkit.org/changeset/77650 might have broken Chromium Linux Release |