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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>63053</bug_id>
          
          <creation_ts>2011-06-21 00:34:55 -0700</creation_ts>
          <short_desc>IndexedDB: createObjectStore() should check if keypath is valid</short_desc>
          <delta_ts>2011-10-14 13:42:32 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>63054</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Kentaro Hara">haraken</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>haraken</cc>
    
    <cc>jsbell</cc>
    
    <cc>robin.qiu.dev</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>424332</commentid>
    <comment_count>0</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2011-06-21 00:34:55 -0700</bug_when>
    <thetext>The spec (http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBDatabase-createObjectStore-IDBObjectStore-DOMString-name-Object-optionalParameters) says &quot;If keyPath is an array and any items in the array is not a valid key path, or if keyPath is a string and is not a valid key path then a NON_TRANSIENT_ERR error must be thrown&quot;. 

However, the current createObjectStore() does not check the keypath argument and thus it does not throw any exception when we give an invalid keypath. I attached the test case that should throw an exception.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>447602</commentid>
    <comment_count>1</comment_count>
    <who name="Robin Qiu">robin.qiu.dev</who>
    <bug_when>2011-08-06 05:58:10 -0700</bug_when>
    <thetext>Forgot to attach the test case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>447603</commentid>
    <comment_count>2</comment_count>
    <who name="Robin Qiu">robin.qiu.dev</who>
    <bug_when>2011-08-06 06:09:02 -0700</bug_when>
    <thetext>This bug was fixed, in commit 63663e38.

 85 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000  85)     if (!IDBIsValidKeyPath(keyPath)) {
 86 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000  86)         ec = IDBDatabaseException::NON_TRANSIENT_ERR;
 87 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000  87)         return 0;
 88 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000  88)     }
 89 63663e38 Source/WebCore/storage/IDBDatabase.cpp (commit-queue@webkit.org 2011-06-22 20:09:05 +0000  89)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>447604</commentid>
    <comment_count>3</comment_count>
    <who name="Robin Qiu">robin.qiu.dev</who>
    <bug_when>2011-08-06 06:18:42 -0700</bug_when>
    <thetext>Duplicate bug, see bug 63054.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>484245</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2011-10-14 13:42:32 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 63054 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>