[Webkit-unassigned] [Bug 62328] IndexedDB createObjectStore should throw if options argument has a getter function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 14 13:40:27 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62328


Joshua Bell <jsbell at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID
                 CC|                            |jsbell at chromium.org




--- Comment #1 from Joshua Bell <jsbell at chromium.org>  2011-10-14 13:40:27 PST ---
The IndexedDB spec is changing to use the (new) WebIDL "dictionary" type for the option objects, and that text has been removed.

My reading of WebIDL [1] and ES5 [2] is that:
* Only dictionary members mentioned in the IDL are considered; ergo, extra properties on the JS object are ignored.
* The [[Get]] internal method will call a getter (ES5 8.12.3)

so this should be valid:

db.createObjectStore('my-name', {
  get keyPath() { return 'my.path'; },
  get autoIncrement() { return true; },
  ignore_other_properties: {},
  even_funky_stuff_like: document
});

... and this appears to work in Chrome 15.

[1] http://dev.w3.org/2006/webapi/WebIDL/#es-dictionary
[2] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

So, marking this as invalid, although there may be some additional edge cases to consider.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list