Closed Bug 916445 Opened 12 years ago Closed 12 years ago

DataStore.sync method

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file, 3 obsolete files)

Documentation about this method can be found here: https://wiki.mozilla.org/WebAPI/DataStore
Attached patch patch (obsolete) — Splinter Review
The DataStoreCursor implements a basic state machine. Documentation of the workflow is at the top of the source code. The mochitest recreates all the scenarios I was able to imagine.
Attachment #804881 - Flags: review?(ehsan)
Comment on attachment 804881 [details] [diff] [review] patch Review of attachment 804881 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/datastore/DataStoreCursor.jsm @@ +8,5 @@ > + > +this.EXPORTED_SYMBOLS = ['DataStoreCursor']; > + > +function debug(s) { > + dump('DEBUG DataStoreCursor: ' + s + '\n'); Please make this conditional on a variable. @@ +76,5 @@ > + return new aWindow.DOMError(aEvent.target.error.name); > +} > + > +/* DataStoreCursor object */ > +function DataStoreCursor(aWindow, aDataStore, aRevisionId) { this.DataStoreCursor here and below. @@ +280,5 @@ > + self.stateMachine(aStore, aRevisionStore, aResolve, aReject); > + return; > + } > + > + // Some revision has to be send. Nit: sent. ::: dom/datastore/tests/test_sync.html @@ +116,5 @@ > + function finish() { > + SimpleTest.finish(); > + } > + > + SpecialPowers.Cu.import("resource://gre/modules/DataStoreChangeNotifier.jsm"); This doesn't seem to be needed AFAICT. ::: dom/webidl/DataStore.webidl @@ +78,5 @@ > + > +dictionary DataStoreTask { > + DOMString revisionId; > + > + IDBCursorDirection operation; I think you meant DataStoreOperation here, right? (Please also fix the wiki page)
Attachment #804881 - Flags: review?(ehsan) → review+
Attached patch patch (obsolete) — Splinter Review
testing it on try.
Attachment #804881 - Attachment is obsolete: true
Attached patch patch (obsolete) — Splinter Review
Attachment #805575 - Attachment is obsolete: true
Attached patch patchSplinter Review
rebased
Attachment #811706 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: