Bug 99860 - [V8] IndexedDB: Crash when lazy-indexing Date keys
Summary: [V8] IndexedDB: Crash when lazy-indexing Date keys
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joshua Bell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-19 11:34 PDT by Joshua Bell
Modified: 2012-10-19 12:47 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.05 KB, patch)
2012-10-19 11:36 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Bell 2012-10-19 11:34:48 PDT
[V8] IndexedDB: Crash when lazy-indexing Date keys
Comment 1 Joshua Bell 2012-10-19 11:36:35 PDT
Created attachment 169663 [details]
Patch
Comment 2 Joshua Bell 2012-10-19 11:39:59 PDT
Noticed this when running:

http://w3c-test.org/webapps/IndexedDB/tests/submissions/Opera/idbobjectstore_createIndex8-valid_keys.htm

When lazy indexing occurs - which is to say, an index is created and there's already data in an object store, so the back-end tells the front-end to cursor over the store to populate the index - if the keys are Date objects a crash occurs in V8.

The proposed fix is totally a cargo-cult copy/paste from other methods.
Comment 3 Adam Barth 2012-10-19 11:46:50 PDT
Comment on attachment 169663 [details]
Patch

Ok.  I feel like I don't fully understand why using an auxiliary context is safe in general, but that's a design question larger than this one patch.
Comment 4 WebKit Review Bot 2012-10-19 12:47:04 PDT
Comment on attachment 169663 [details]
Patch

Clearing flags on attachment: 169663

Committed r131934: <http://trac.webkit.org/changeset/131934>
Comment 5 WebKit Review Bot 2012-10-19 12:47:07 PDT
All reviewed patches have been landed.  Closing bug.