Bug 44695 - Add index insertion support to IndexedDB.
Summary: Add index insertion support to IndexedDB.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 10:38 PDT by Jeremy Orlow
Modified: 2010-09-06 04:19 PDT (History)
8 users (show)

See Also:


Attachments
Patch (31.36 KB, patch)
2010-08-26 10:42 PDT, Jeremy Orlow
no flags Details | Formatted Diff | Diff
Patch (31.56 KB, patch)
2010-08-31 06:55 PDT, Jeremy Orlow
no flags Details | Formatted Diff | Diff
Patch (31.56 KB, patch)
2010-09-03 06:24 PDT, Jeremy Orlow
steveblock: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2010-08-26 10:38:34 PDT
Add index insertion support to IndexedDB.
Comment 1 Jeremy Orlow 2010-08-26 10:40:55 PDT
+ Darin to look at the asserts I've added to WebKit.
Comment 2 Jeremy Orlow 2010-08-26 10:42:12 PDT
Created attachment 65579 [details]
Patch
Comment 3 Jeremy Orlow 2010-08-31 06:55:01 PDT
Created attachment 66046 [details]
Patch
Comment 4 Darin Fisher (:fishd, Google) 2010-08-31 09:52:51 PDT
Comment on attachment 66046 [details]
Patch

> +++ b/WebKit/chromium/public/WebVector.h
> @@ -115,8 +115,16 @@ public:
>      size_t size() const { return m_size; }
>      bool isEmpty() const { return !m_size; }
>  
> -    T& operator[](size_t i) { return m_ptr[i]; }
> -    const T& operator[](size_t i) const { return m_ptr[i]; }
> +    T& operator[](size_t i)
> +    {
> +        WEBKIT_ASSERT(i < m_size);
> +        return m_ptr[i];
> +    }
> +    const T& operator[](size_t i) const
> +    {
> +        WEBKIT_ASSERT(i < m_size);
> +        return m_ptr[i];
> +    }
>  
>      T* data() { return m_ptr; }
>      const T* data() const { return m_ptr; }

LGTM for the above change.
Comment 5 Jeremy Orlow 2010-09-02 10:41:47 PDT
Comment on attachment 66046 [details]
Patch

Steve did a review with me on my computer.  His 2 comments:

> doDelete(sqliteDatabase(), "DELETE FROM IndexData WHERE indexId IN (SELECT id FROM Indexes WHERE objectStoreId = ?)", objectStore->id());

Index on the indexID.



? static void putObjectStoreData(SQLiteDatabase& db, bool isExistingValue, IDBKey* key, SerializedScriptValue* value, int64_t objectStoreId, int64_t* dataRowId)

get rid of isExistingValue..just key off of dataRowId
Comment 6 Jeremy Orlow 2010-09-03 06:24:20 PDT
Created attachment 66486 [details]
Patch
Comment 7 WebKit Review Bot 2010-09-03 06:55:55 PDT
Attachment 66486 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/3948085
Comment 8 Steve Block 2010-09-03 06:59:02 PDT
Comment on attachment 66486 [details]
Patch

IDBObjectStoreBackendImpl.cpp:128
Oops!

r=me, subject to typo fix
Comment 9 Jeremy Orlow 2010-09-05 09:29:15 PDT
Will land after next webkit roll.  Thanks!
Comment 10 Jeremy Orlow 2010-09-06 03:33:54 PDT
Committed r66820: <http://trac.webkit.org/changeset/66820>
Comment 11 WebKit Review Bot 2010-09-06 04:19:11 PDT
http://trac.webkit.org/changeset/66820 might have broken Qt Linux Release