Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review and bugfix Dexie.Observable and Dexie.Syncable #393

Merged
merged 14 commits into from
Dec 8, 2016

Conversation

dfahlander
Copy link
Collaborator

No description provided.

sendMessage() did wait for non-indexeddb async task within a transaction which didn't lead to any complaints in Dexie 1.x but now fails with PrematureCommitError.

For general stability of sendMessage(), it's no more trying to reuse any existing transaction. Instead it will always spawn its own transaction.

Also, in case caller is within non-awaited transaction, sendMessage will not block that transaction (Sounds wierd?  What do I mean with non-awaited transaction? I mean a transaction block that don't return a promise, which will make db.transaction() use Promise.follow() to join what's happening. sendMessage() will now generate and wait for promises in a Dexie.ignoreTransaction() zone which makes it not being waited for by Promise.follow().
Now the dexie tests run fine with syncable addon active in chrome.

http://localhost:8080/addons/Dexie.Syncable/test/test-syncable-dexie-tests.html
Reverted to functions for IE to be able to parse.
@dfahlander dfahlander merged commit cc0181c into master Dec 8, 2016
@dfahlander dfahlander deleted the temp/issue388 branch December 9, 2016 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant