W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

IndexedDB: Extra properties in optionalParameters objects

From: Joshua Bell <jsbell@chromium.org>
Date: Tue, 24 Jan 2012 14:36:20 -0800
Message-ID: <CAD649j4MZvw4pi6bHvMuRif_eatZ87NSY2nGWX3BCbtALjNmSA@mail.gmail.com>
To: public-webapps@w3.org
I noticed a test regarding optional parameters on
http://samples.msdn.microsoft.com/ietestcenter/#indexeddb that IE10PP4 and
Chrome 15 are marked as failing and Firefox 8 is marked as passing. (I have
Chrome 18 and FF9 handy - no changes.)

The specific test is "IDBDatabase.createObjectStore() - attempt to create
an object store with an invalid optional parameter" at
the actual JavaScript code that's being tested:

objStore = db.createObjectStore(objectStoreName, { parameter: 0 });

By my reading of the IDB and WebIDL specs, the optionalParameters parameter
is a WebIDL dictionary (
http://www.w3.org/TR/IndexedDB/#options-object-concept). The ECMAScript
binding algorithm for WebIDL dictionaries (
http://www.w3.org/TR/WebIDL/#es-dictionary) is such that the members
expected in the IDL dictionary are read out of the ECMAScript object, but
the properties of the ECMAScript object itself are never enumerated and
therefore "extra" properties should be ignored. Therefore, the "parameter"
property in the test code would be ignored, and this would be treated the
same as db.createObjectStore(name, {}) which should not produce an error.

So I would consider the IE10 and Chrome behavior correct, and the test
itself and Firefox behavior incorrect.

Received on Tuesday, 24 January 2012 22:36:51 UTC

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