Bug 126924 - Add uint8_t specialization for WebCore::writeLittleEndian()
Summary: Add uint8_t specialization for WebCore::writeLittleEndian()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-13 11:53 PST by Daniel Bates
Modified: 2014-01-13 12:52 PST (History)
10 users (show)

See Also:


Attachments
Patch (1.68 KB, patch)
2014-01-13 11:54 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (1.60 KB, patch)
2014-01-13 12:01 PST, Daniel Bates
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2014-01-13 11:53:25 PST
When I ran Tools/Scripts/build-webkit --debug --device, the build failed to compile SerializedScriptValue.cpp with the following error:
 
/OpenSource/Source/WebCore/bindings/js/SerializedScriptValue.cpp:421:19: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
/OpenSource/Source/WebCore/bindings/js/SerializedScriptValue.cpp:967:9: note: in instantiation of function template specialization 'WebCore::writeLittleEndian<unsigned char>' requested here
1 error generated.
Comment 1 Daniel Bates 2014-01-13 11:54:13 PST
Created attachment 221069 [details]
Patch
Comment 2 Darin Adler 2014-01-13 11:58:52 PST
Comment on attachment 221069 [details]
Patch

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

> Source/WebCore/bindings/js/SerializedScriptValue.cpp:431
> +    if (length > std::numeric_limits<uint32_t>::max())
> +        return false;

This can’t happen. A uint32_t can’t be higher than the maximum.
Comment 3 Daniel Bates 2014-01-13 12:01:16 PST
Created attachment 221070 [details]
Patch
Comment 4 Daniel Bates 2014-01-13 12:02:22 PST
(In reply to comment #2)
> (From update of attachment 221069 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=221069&action=review
> 
> > Source/WebCore/bindings/js/SerializedScriptValue.cpp:431
> > +    if (length > std::numeric_limits<uint32_t>::max())
> > +        return false;
> 
> This can’t happen. A uint32_t can’t be higher than the maximum.

You're right! I removed this conditional.
Comment 5 Daniel Bates 2014-01-13 12:52:02 PST
Committed r161903: <http://trac.webkit.org/changeset/161903>