<?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>14408</bug_id>
          
          <creation_ts>2011-10-07 23:37:52 +0000</creation_ts>
          <short_desc>[IndexedDB] Cursors .key/.primaryKey/.value shouldn&apos;t throw as soon as .continue is called</short_desc>
          <delta_ts>2012-02-22 18:16:28 +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>PC</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonas Sicking (Not reading bugmail)">jonas</reporter>
          <assigned_to name="Jonas Sicking (Not reading bugmail)">jonas</assigned_to>
          <cc>israelh</cc>
    
    <cc>mike</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>57973</commentid>
    <comment_count>0</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-10-07 23:37:52 +0000</bug_when>
    <thetext>Currently the &apos;got value&apos; flag is set to false as soon as .continue() is called. This makes it awkward to call .continue() at the top of your success handler and then have several different branches that do different things depending on the data since each branch has to take care to call .continue() at the end.

Instead we should let cursors keep their current value until the success/error event is fired, at which point their values are updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59496</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-11-02 15:47:21 +0000</bug_when>
    <thetext>I&apos;ll take this bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60697</commentid>
    <comment_count>2</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2011-11-30 20:11:24 +0000</bug_when>
    <thetext>Fixed. Cursors now keep their value until a new value is loaded, or the cursor iterates off the end.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64155</commentid>
    <comment_count>3</comment_count>
    <who name="Israel Hilerio [MSFT]">israelh</who>
    <bug_when>2012-02-15 23:00:30 +0000</bug_when>
    <thetext>Do we need to remove the following text from the IDBCursor.continue and IDBCursor.advance methods to finalize the changes to this bug:

--&gt;Before this method returns, unless an exception was thrown, it sets the got value flag on the cursor to false.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64167</commentid>
    <comment_count>4</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2012-02-16 14:28:32 +0000</bug_when>
    <thetext>I think it&apos;s still needed such that calling .continue() a second time still throws.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64168</commentid>
    <comment_count>5</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2012-02-16 14:29:12 +0000</bug_when>
    <thetext>Note that the &apos;got value&apos; flag doesn&apos;t affect the definition of the key/primaryKey/value attributes any more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64176</commentid>
    <comment_count>6</comment_count>
    <who name="Israel Hilerio [MSFT]">israelh</who>
    <bug_when>2012-02-16 17:32:37 +0000</bug_when>
    <thetext>Does that mean that setting the &apos;got value&apos; flag to false won&apos;t prevent me from reading the cursor information that was returned to the onsuccess handler after the continue method is invoked?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64415</commentid>
    <comment_count>7</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2012-02-22 12:01:30 +0000</bug_when>
    <thetext>Exactly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64439</commentid>
    <comment_count>8</comment_count>
    <who name="Israel Hilerio [MSFT]">israelh</who>
    <bug_when>2012-02-22 18:16:28 +0000</bug_when>
    <thetext>Jonas, Thanks for the feedback.  This makese sense. I&apos;ll go ahead and close the bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>