W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [IndexedDB] Re: onsuccess callback in race condition?

From: <victor.hong@nokia.com>
Date: Thu, 15 Jul 2010 21:27:29 +0200
To: <jorlow@chromium.org>
CC: <public-webapps@w3.org>
Message-ID: <C864D961.D7F0%victor.hong@nokia.com>
The example in introdution section looks good.

I quoted from section 3.2.2 The INBRequest Interface.

In the following example, we open a database asynchronously. Various event handlers are registered for responding to various situations.

indexedDB.request.onsuccess = function(evt) {...};
indexedDB.request.onerror = function(evt) {...};
indexedDB.open('AddressBook', 'Address Book');

Maybe this needs to be updated?

On 7/15/10 3:18 PM, "ext Jeremy Orlow" <jorlow@chromium.org> wrote:

On Thu, Jul 15, 2010 at 8:16 PM,  <victor.hong@nokia.com> wrote:

On 7/15/10 1:13 PM, "ext Jeremy Orlow" <jorlow@chromium.org> wrote:

> On Thu, Jul 15, 2010 at 6:04 PM,  <victor.hong@nokia.com> wrote:
>> Hi Jeremy,
>> Thank you for responding. If I understand you correctly, the example 1 could
>> produce a race condition,
> I don't see how.  onsuccess is always set immediately after the request object
> is created by the asynchronous call.
>> and example 2 will not.
> This example is completely outdated and will not work period.  Please take a
> look at the latest editors draft.  (A lot of the async changes were just
> committed.)

I was quoting from this draft (July 15 2010)

Is it outdated already?
And where do I go for the latest?

The example was fixed a couple hours after your initial message.  :-)

- Victor
Received on Thursday, 15 July 2010 19:28:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:10 UTC