<?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>85293</bug_id>
          
          <creation_ts>2012-05-01 09:39:29 -0700</creation_ts>
          <short_desc>IndexedDB: Refactor *::loadCurrentRow() to share more code</short_desc>
          <delta_ts>2013-04-08 11:02:50 -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>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="Alec Flett">alecflett</reporter>
          <assigned_to name="Alec Flett">alecflett</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>613473</commentid>
    <comment_count>0</comment_count>
    <who name="Alec Flett">alecflett</who>
    <bug_when>2012-05-01 09:39:29 -0700</bug_when>
    <thetext>There is a lot of duplicated code, specifically a lot of tricky version-checking logic that is duplicated between:
* ObjectStoreCursorImpl::loadCurrentRow()
* IndexCursorImpl::loadCurrentRow()
* IndexKeyCursorImpl::loadCurrentRow()

Most of the common/version-checking code could go into CursorImplCommon

As an aside, there are also a lot of places where these methods return &apos;false&apos; because the data found is either the wrong version or somehow corrupt. We should think about if we should, at least in the index cases, remove the data so that corrupt data doesn&apos;t build up inside the leveldb and slow down iteration. (i.e. imagine something goes haywire and some large chunk of data is corrupt - we&apos;ll have to keep skipping over that data every time we iterate) See bug 85224 for an example of where this was causing a real performance issue. That case has been cleaned up but we might want to handle more cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>613475</commentid>
    <comment_count>1</comment_count>
    <who name="Alec Flett">alecflett</who>
    <bug_when>2012-05-01 09:39:54 -0700</bug_when>
    <thetext>filed bug 85293 about the refactoring</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>