Re: Indexed DB Transactions vs. Microtasks

2014-06-19 Thread Adam Klein
On Fri, Jun 6, 2014 at 5:51 PM, Jonas Sicking wrote: > On Thu, Jun 5, 2014 at 12:59 PM, Joshua Bell wrote: > > case 1: > > > > var tx; > > Promise.resolve().then(function() { > > tx = db.transaction(storeName); > > // tx should be active here... > > }).then(function() { > > //

Re: Indexed DB Transactions vs. Microtasks

2014-06-19 Thread Anne van Kesteren
On Thu, Jun 19, 2014 at 7:48 AM, Domenic Denicola wrote: > Hmm, it seems pretty related to me. In particular if we say that the IDB > microtask bucket always runs after all other microtask buckets, doesn't that > achieve the goals? He said after each microtask (singular). -- http://annevanke

RE: Indexed DB Transactions vs. Microtasks

2014-06-18 Thread Domenic Denicola
From: ad...@google.com [mailto:ad...@google.com] On Behalf Of Adam Klein > This seems orthogonal to bucketing. The IDB transaction deactivation step > isn't a sort of work that we'd want to bucket (as I argued in my previous > message, treating this IDB work as a task leads down some bad roads)

Re: Indexed DB Transactions vs. Microtasks

2014-06-18 Thread Adam Klein
On Wed, Jun 18, 2014 at 9:13 PM, Domenic Denicola < dome...@domenicdenicola.com> wrote: > [+Yehuda, +Raf] > > From: Jonas Sicking [mailto:jo...@sicking.cc] > > > On Thu, Jun 19, 2014 at 8:44 AM, Adam Klein wrote: > >> While I agree that the original microtask intent would suggest we > >> change t

RE: Indexed DB Transactions vs. Microtasks

2014-06-18 Thread Domenic Denicola
[+Yehuda, +Raf] From: Jonas Sicking [mailto:jo...@sicking.cc] > On Thu, Jun 19, 2014 at 8:44 AM, Adam Klein wrote: >> While I agree that the original microtask intent would suggest we >> change this, and I concur that it seems unlikely to break content, I >> worry about the spec and implement

Re: Indexed DB Transactions vs. Microtasks

2014-06-18 Thread Jonas Sicking
On Thu, Jun 19, 2014 at 8:44 AM, Adam Klein wrote: > While I agree that the original microtask intent would suggest we change > this, and I concur that it seems unlikely to break content, I worry about > the spec and implementation complexity that would be incurred by having to > support the notio

Re: Indexed DB Transactions vs. Microtasks

2014-06-18 Thread Adam Klein
On Fri, Jun 6, 2014 at 5:51 PM, Jonas Sicking wrote: > On Thu, Jun 5, 2014 at 12:59 PM, Joshua Bell wrote: > > case 1: > > > > var tx; > > Promise.resolve().then(function() { > > tx = db.transaction(storeName); > > // tx should be active here... > > }).then(function() { > > //

Re: Indexed DB Transactions vs. Microtasks

2014-06-06 Thread Jonas Sicking
On Thu, Jun 5, 2014 at 12:59 PM, Joshua Bell wrote: > case 1: > > var tx; > Promise.resolve().then(function() { > tx = db.transaction(storeName); > // tx should be active here... > }).then(function() { > // is tx active here? > }); > > For case 1, ISTM that "yes" matches the ID

Re: Indexed DB Transactions vs. Microtasks

2014-06-05 Thread Ian Hickson
On Thu, 5 Jun 2014, Joshua Bell wrote: > > For case 2, it looks like implementations differ on whether microtasks > are run as part of the event dispatch. This seems to be outside the > domain of the IDB spec itself, somewhere between DOM and ES. Anyone want > to offer an interpretation? Event

Indexed DB Transactions vs. Microtasks

2014-06-05 Thread Joshua Bell
Playing with Promise wrappers for IDB, the intersection of IDBTransaction's |active| state and microtask execution came up. Here are a couple of interesting cases: case 1: var tx; Promise.resolve().then(function() { tx = db.transaction(storeName); // tx should be active here... }).t