Bug 150910 - Modern IDB: Implement IDBIndex get/getKey/count requests
Summary: Modern IDB: Implement IDBIndex get/getKey/count requests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 149117 150939
  Show dependency treegraph
 
Reported: 2015-11-04 16:42 PST by Brady Eidson
Modified: 2015-11-05 12:24 PST (History)
4 users (show)

See Also:


Attachments
Patch v1 (59.85 KB, patch)
2015-11-05 11:38 PST, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff
Patch for landing (60.41 KB, patch)
2015-11-05 12:07 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2015-11-04 16:42:56 PST
Modern IDB: Implement IDBIndex get/getKey/count requests

For the sake of patch reviewing, this initial run will already return empty values for get/getKey and always return 0 for count.

That is because indexes don't actually *index* yet.

But doing it this way first (returning the bum values) will make this patch much more reviewable, and make the "actually index things" patch much more reviewable.
Comment 1 Brady Eidson 2015-11-05 11:38:07 PST
Created attachment 264874 [details]
Patch v1
Comment 2 Brady Eidson 2015-11-05 11:39:02 PST
FWIW, after this is resolved, https://bugs.webkit.org/show_bug.cgi?id=150939 will make indexes actually index.
Comment 3 Alex Christensen 2015-11-05 11:56:43 PST
Comment on attachment 264874 [details]
Patch v1

View in context: https://bugs.webkit.org/attachment.cgi?id=264874&action=review

> Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp:449
> +Ref<IDBRequest> IDBTransaction::requestGetValue(ScriptExecutionContext& context, IDBIndex& index, const IDBKeyRangeData& range)

This is just like requestGetKey.  Factor the common code out.

> Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp:52
> +    return { };

Will this be filled in soon?  Maybe a FIXME
Comment 4 Brady Eidson 2015-11-05 12:02:25 PST
(In reply to comment #3)
> Comment on attachment 264874 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=264874&action=review
> 
> > Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp:449
> > +Ref<IDBRequest> IDBTransaction::requestGetValue(ScriptExecutionContext& context, IDBIndex& index, const IDBKeyRangeData& range)
> 
> This is just like requestGetKey.  Factor the common code out.
> 
> > Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp:52
> > +    return { };
> 
> Will this be filled in soon?  Maybe a FIXME

See https://bugs.webkit.org/show_bug.cgi?id=150910#c2
Comment 5 Brady Eidson 2015-11-05 12:02:47 PST
(In reply to comment #4)
> (In reply to comment #3)
> > Comment on attachment 264874 [details]
> > Patch v1
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=264874&action=review
> > 
> > > Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp:449
> > > +Ref<IDBRequest> IDBTransaction::requestGetValue(ScriptExecutionContext& context, IDBIndex& index, const IDBKeyRangeData& range)
> > 
> > This is just like requestGetKey.  Factor the common code out.
> > 
> > > Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp:52
> > > +    return { };
> > 
> > Will this be filled in soon?  Maybe a FIXME
> 
> See https://bugs.webkit.org/show_bug.cgi?id=150910#c2

(But I'll put the fixme in code)
Comment 6 Brady Eidson 2015-11-05 12:07:55 PST
Created attachment 264876 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2015-11-05 12:23:57 PST
Comment on attachment 264876 [details]
Patch for landing

Clearing flags on attachment: 264876

Committed r192068: <http://trac.webkit.org/changeset/192068>
Comment 8 WebKit Commit Bot 2015-11-05 12:24:00 PST
All reviewed patches have been landed.  Closing bug.