Closed Bug 698440 Opened 13 years ago Closed 13 years ago

IndexedDB: Implement optional version syntax.

Categories

(Core :: Storage: IndexedDB, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: khuey, Assigned: khuey)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Attached patch PatchSplinter Review
No description provided.
Attachment #570711 - Flags: review?(bent.mozilla)
The tests here look a bit lacking. Is it really testing that opening an existing database opens it with the database's existing version and objectStores, and that if there exists no database, a new one is created with version 1?
It's not testing anything with objectStores, but it is testing the version bits. Adding more tests isn't hard.
Comment on attachment 570711 [details] [diff] [review] Patch Review of attachment 570711 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/indexedDB/IDBFactory.cpp @@ +380,5 @@ > NS_IMETHODIMP > IDBFactory::Open(const nsAString& aName, > PRInt64 aVersion, > JSContext* aCx, > + PRUint8 aArgc, Nit: This isn't argc, it's the number of optional args passed. Call it 'aOptionalArgCount' ::: dom/indexedDB/OpenDatabaseHelper.cpp @@ +753,5 @@ > + // treat it as if version 1 were requested. > + if (mCurrentVersion == 0) { > + mRequestedVersion = 1; > + } > + // Otherwise, treat it as if the current version were requested. Nit: move this comment inside the else block. ::: dom/indexedDB/nsIIDBFactory.idl @@ +56,2 @@ > nsIIDBOpenDBRequest > + open(in AString name, [optional] in long long version); Nit: Each arg gets its own line.
Attachment #570711 - Flags: review?(bent.mozilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla10 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: