Bug 90016 - IndexedDB: make IDBKey immutable
Summary: IndexedDB: make IDBKey immutable
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: Alec Flett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-26 14:43 PDT by Alec Flett
Modified: 2012-06-27 15:14 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.09 KB, patch)
2012-06-26 14:45 PDT, Alec Flett
no flags Details | Formatted Diff | Diff
Patch (6.08 KB, patch)
2012-06-27 12:26 PDT, Alec Flett
no flags Details | Formatted Diff | Diff
Patch for landing (6.09 KB, patch)
2012-06-27 14:30 PDT, Alec Flett
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Flett 2012-06-26 14:43:45 PDT
IndexedDB: const-ify IDBKey
Comment 1 Alec Flett 2012-06-26 14:45:15 PDT
Created attachment 149610 [details]
Patch
Comment 2 Alec Flett 2012-06-26 14:46:03 PDT
jsbell@ - something we chatted about once that I finally had to deal with :)
Comment 3 Alec Flett 2012-06-26 15:01:50 PDT
tony@ - r? cq?
Comment 4 Joshua Bell 2012-06-26 15:09:36 PDT
Comment on attachment 149610 [details]
Patch

That was easy - LGTM but...

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

> Source/WebCore/Modules/indexeddb/IDBKey.h:44
>          RefPtr<IDBKey> idbKey = adoptRef(new IDBKey());

Can be further simplified down to: return adoptRef(...);

> Source/WebCore/Modules/indexeddb/IDBKey.h:50
> +        RefPtr<IDBKey> idbKey = adoptRef(new IDBKey(NumberType, number));

Ditto, etc.
Comment 5 Alec Flett 2012-06-27 12:26:38 PDT
Created attachment 149782 [details]
Patch
Comment 6 Alec Flett 2012-06-27 12:29:08 PDT
tony@ - r? cq?
Comment 7 Tony Chang 2012-06-27 13:29:26 PDT
Comment on attachment 149782 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        IndexedDB: const-ify IDBKey

Nit: I would probably use immutable in the title, since it's more descriptive than const-ify.

> Source/WebCore/Modules/indexeddb/IDBKey.h:153
> +    IDBKey(const String& value) : m_type(StringType), m_string(value), m_number(0), m_sizeEstimate(kOverheadSize + value.length() * sizeof(UChar)) { }

Nit: explicit
Comment 8 Alec Flett 2012-06-27 13:44:47 PDT
I'm going to use land-safely even though my comitter status hasn't been updated, so that a committer can re-cq+ it.
Comment 9 Tony Chang 2012-06-27 14:13:48 PDT
(In reply to comment #8)
> I'm going to use land-safely even though my comitter status hasn't been updated, so that a committer can re-cq+ it.

land-safely should set cq? if you're not in committers.py (this was a recent fix).
Comment 10 Alec Flett 2012-06-27 14:30:00 PDT
Created attachment 149796 [details]
Patch for landing
Comment 11 WebKit Review Bot 2012-06-27 15:14:09 PDT
Comment on attachment 149796 [details]
Patch for landing

Clearing flags on attachment: 149796

Committed r121377: <http://trac.webkit.org/changeset/121377>
Comment 12 WebKit Review Bot 2012-06-27 15:14:14 PDT
All reviewed patches have been landed.  Closing bug.