Bug 81147

Summary: Typed Array create() methods do not accept const arrays
Product: WebKit Reporter: David Dorwin <ddorwin>
Component: JavaScriptCoreAssignee: David Dorwin <ddorwin>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, kbr, oliver, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description David Dorwin 2012-03-14 13:02:18 PDT
Many of the Typed Arrays (classes derived from TypedArrayBase) do not allow a pointer to a const array to be passed to the create method. For example:
    static inline PassRefPtr<Uint8Array> create(unsigned char* array, unsigned length);

These methods use
    static PassRefPtr<Subclass> create(const T* array, unsigned length)
so there is no reason the type of the first parameter cannot be const.

The example above should be:
    static inline PassRefPtr<Uint8Array> create(const unsigned char* array, unsigned length);
Comment 1 David Dorwin 2012-03-14 13:20:52 PDT
Created attachment 131908 [details]
Patch
Comment 2 Kenneth Russell 2012-03-14 16:38:02 PDT
Comment on attachment 131908 [details]
Patch

Thanks for fixing this. r=me
Comment 3 WebKit Review Bot 2012-03-15 16:58:49 PDT
Comment on attachment 131908 [details]
Patch

Clearing flags on attachment: 131908

Committed r110913: <http://trac.webkit.org/changeset/110913>
Comment 4 WebKit Review Bot 2012-03-15 16:58:54 PDT
All reviewed patches have been landed.  Closing bug.