<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>19450</bug_id>
          
          <creation_ts>2012-10-10 20:57:35 +0000</creation_ts>
          <short_desc>[IndexedDB] Key path segments should permit reserved words</short_desc>
          <delta_ts>2013-03-01 01:06:39 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Indexed Database API</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Bell">jsbell</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>mike</cc>
    
    <cc>odinho</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>75865</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2012-10-10 20:57:35 +0000</bug_when>
    <thetext>In the IDB spec the definition of a valid key path is built around:

A DOMString containing a JavaScript identifier [ECMA-262].

... plus dotted combinations of identifiers and arrays thereof.

ECMA-262 gives:

Identifier ::
  IdentifierName but not ReservedWord

IdentifierName ::
  IdentifierStart
  IdentifierName IdentifierPart
(etc)

And defines ReservedWord as:

ReservedWord ::
  Keyword
  FutureReservedWord
  NullLiteral
  BooleanLiteral

Keyword :: one of
  break do instanceof typeof case else new var ...
(etc)

This would appear to preclude key paths such as:

&quot;foo.delete.bar&quot;
&quot;my.public.data&quot;
&quot;response.true.details&quot;
&quot;options.null&quot;

Neither FF nor Chrome appear to reject such key paths.

I suggest the IDB spec be updated to refer specifically to the IdentifierName production in ECMA-262.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76567</commentid>
    <comment_count>1</comment_count>
    <who name="Odin Hørthe Omdal">odinho</who>
    <bug_when>2012-10-18 10:12:55 +0000</bug_when>
    <thetext>Opera also allows such keypaths. Looking at the implementation it calls the IdentifierName checker from our ecmascript module. Guess that&apos;s what everyone else did as well :P

I proactively changed keypath tests to also test that:

http://w3c-test.org/webapps/IndexedDB/tests/submissions/Opera/keypath.htm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83856</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2013-03-01 01:06:39 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/IndexedDB/rev/c6b12332f5ae</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>