Bug 42970 - [IndexedDB] IndexedDB is missing the Transaction interface.
Summary: [IndexedDB] IndexedDB is missing the Transaction interface.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://dvcs.w3.org/hg/IndexedDB/raw-f...
Keywords:
Depends on: 42966
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-26 05:14 PDT by Andrei Popescu
Modified: 2010-08-06 03:15 PDT (History)
5 users (show)

See Also:


Attachments
Patch (25.69 KB, patch)
2010-08-05 05:27 PDT, Andrei Popescu
no flags Details | Formatted Diff | Diff
Patch (41.98 KB, patch)
2010-08-05 09:34 PDT, Andrei Popescu
no flags Details | Formatted Diff | Diff
Patch (41.94 KB, patch)
2010-08-05 09:43 PDT, Andrei Popescu
no flags Details | Formatted Diff | Diff
Patch (41.83 KB, patch)
2010-08-05 10:19 PDT, Andrei Popescu
jorlow: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Popescu 2010-07-26 05:14:03 PDT
We need to implement Transaction:

http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#transaction

This interface has changed significantly due to 

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9975

So we need to update the IndexedDB implementation to match the current spec first. Hence this bug depends on 42966.
Comment 1 Andrei Popescu 2010-08-05 05:27:48 PDT
Created attachment 63579 [details]
Patch
Comment 2 WebKit Review Bot 2010-08-05 05:29:55 PDT
Attachment 63579 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/storage/IDBTransaction.idl:1:  One or more unexpected \r (^M) found; better to use only a \n  [whitespace/carriage_return] [1]
Suppressing further [whitespace/carriage_return] reports for this file.
Total errors found: 57 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Jeremy Orlow 2010-08-05 06:56:28 PDT
Comment on attachment 63579 [details]
Patch

WebCore/dom/EventNames.h:45
 +      macro(complete) \
what is this stuff?

WebCore/storage/IDBDatabase.idl:42
 +          [CallWith=ScriptExecutionContext] IDBTransaction transaction (in [Optional] DOMStringList storeNames, in [Optional] unsigned short mode, in [Optional] unsigned long timeout);
not sure using domStringList as an input like this will work out of the box....I don't think anyone's tried

WebCore/storage/IDBTask.h:2
 +   * Copyright (C) 2010 Google Inc. All rights reserved.
use ScriptExecutionContext::Task and the CrossThreadTask stuff instead of rolling your own

WebCore/storage/IDBTransaction.cpp:15
 +      : ActiveDOMObject(context, this), m_transaction(backend), m_database(db)
put each on its own line

WebCore/storage/IDBTransaction.cpp:25
 +      return IDBTransaction::READ_ONLY;
Hook these up to the backend interface...I actually don't think you need any FIXMEs in this file since all the work happens in the backend.

WebCore/storage/IDBTransaction.h:85
 +      RefPtr<IDBTransactionBackendInterface> m_transaction;
m_backend maybe?
Comment 4 Andrei Popescu 2010-08-05 09:34:55 PDT
Created attachment 63600 [details]
Patch
Comment 5 Andrei Popescu 2010-08-05 09:37:06 PDT
Thanks for the quick review Jeremy!

(In reply to comment #3)
> (From update of attachment 63579 [details])
> WebCore/dom/EventNames.h:45
>  +      macro(complete) \
> what is this stuff?
>

IDBTransaction adds two new events: oncomplete and ontimeout.
 
> WebCore/storage/IDBDatabase.idl:42
>  +          [CallWith=ScriptExecutionContext] IDBTransaction transaction (in [Optional] DOMStringList storeNames, in [Optional] unsigned short mode, in [Optional] unsigned long timeout);
> not sure using domStringList as an input like this will work out of the box....I don't think anyone's tried
> 


Yeah, I'll check and see. If it's not working, I'll fix it in a separate patch.


> WebCore/storage/IDBTask.h:2
>  +   * Copyright (C) 2010 Google Inc. All rights reserved.
> use ScriptExecutionContext::Task and the CrossThreadTask stuff instead of rolling your own
> 

Used.

> WebCore/storage/IDBTransaction.cpp:15
>  +      : ActiveDOMObject(context, this), m_transaction(backend), m_database(db)
> put each on its own line
>

Put.
 
> WebCore/storage/IDBTransaction.cpp:25
>  +      return IDBTransaction::READ_ONLY;
> Hook these up to the backend interface...I actually don't think you need any FIXMEs in this file since all the work happens in the backend.
>

Hooked.
 
> WebCore/storage/IDBTransaction.h:85
>  +      RefPtr<IDBTransactionBackendInterface> m_transaction;
> m_backend maybe?

Done.
Comment 6 WebKit Review Bot 2010-08-05 09:40:23 PDT
Attachment 63600 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/storage/IDBTransaction.idl:1:  One or more unexpected \r (^M) found; better to use only a \n  [whitespace/carriage_return] [1]
Suppressing further [whitespace/carriage_return] reports for this file.
Total errors found: 57 in 29 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Andrei Popescu 2010-08-05 09:43:01 PDT
Created attachment 63601 [details]
Patch
Comment 8 WebKit Review Bot 2010-08-05 09:45:17 PDT
Attachment 63601 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/storage/IDBTransaction.idl:1:  One or more unexpected \r (^M) found; better to use only a \n  [whitespace/carriage_return] [1]
Suppressing further [whitespace/carriage_return] reports for this file.
Total errors found: 57 in 29 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Andrei Popescu 2010-08-05 10:19:12 PDT
Created attachment 63604 [details]
Patch
Comment 10 Jeremy Orlow 2010-08-05 10:57:46 PDT
Comment on attachment 63604 [details]
Patch

WebCore/Android.mk:758
 +  	storage/IDBTransaction.cpp \
Alpha order

WebCore/CMakeLists.txt:349
 +      storage/IDBTransaction.idl
You need to add the other files too

WebCore/GNUmakefile.am:2902
 +  	WebCore/storage/IDBTransactionBackendInterface
.h


WebCore/storage/IDBTransaction.cpp:28
 +      return IDBTransaction::READ_ONLY;
forward to backend


r=me
Comment 11 Andrei Popescu 2010-08-06 02:42:45 PDT
Committed r64824: <http://trac.webkit.org/changeset/64824>
Comment 12 WebKit Review Bot 2010-08-06 03:15:32 PDT
http://trac.webkit.org/changeset/64824 might have broken Qt Windows 32-bit Release