Bug 56651 - Web Inspector: migrate Inspector.json to valid JSON types.
Summary: Web Inspector: migrate Inspector.json to valid JSON types.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-18 10:08 PDT by Pavel Feldman
Modified: 2011-03-21 00:54 PDT (History)
10 users (show)

See Also:


Attachments
Patch (95.69 KB, patch)
2011-03-19 11:20 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2011-03-18 10:08:11 PDT
Numbers should be "integer" or "number". No "unsigned" or "long" allowed.
Comment 1 Pavel Feldman 2011-03-19 11:20:48 PDT
Created attachment 86267 [details]
Patch
Comment 2 Ilya Tikhonovsky 2011-03-19 11:36:14 PDT
Comment on attachment 86267 [details]
Patch

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

lgtm

> Source/WebCore/inspector/InspectorConsoleAgent.cpp:238
> +    int messageCount = m_consoleMessages.size();
> +    for (int i = 0; i < messageCount; ++i)

why did you change this?

> Source/WebCore/inspector/InspectorConsoleAgent.h:97
> -    unsigned m_expiredConsoleMessageCount;
> -    HashMap<String, unsigned> m_counts;
> +    int m_expiredConsoleMessageCount;
> +    HashMap<String, int> m_counts;

ditto
Comment 3 Yury Semikhatsky 2011-03-21 00:38:34 PDT
Comment on attachment 86267 [details]
Patch

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

Please address comments before landing.

> Source/WebCore/inspector/InspectorConsoleAgent.cpp:237
> +    int messageCount = m_consoleMessages.size();

If you are changing type of the counter, it should become size_t, not int.

>> Source/WebCore/inspector/InspectorConsoleAgent.h:97
>> +    HashMap<String, int> m_counts;
> 
> ditto

I agree, I'd rather leave unsigned as value type here and cast if needed when formatting protocol messages.
Comment 4 Pavel Feldman 2011-03-21 00:54:59 PDT
Committed r81572: <http://trac.webkit.org/changeset/81572>