Bug 188065

Summary: arrayProtoPrivateFuncConcatMemcpy() should handle copying from an Undecided type array.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, keith_miller, king_pirate11, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
saam: review+
patch for landing. none

Description Mark Lam 2018-07-26 11:16:33 PDT
<rdar://problem/42515726>
Comment 1 Mark Lam 2018-07-26 11:24:32 PDT
Created attachment 345853 [details]
proposed patch.
Comment 2 Saam Barati 2018-07-26 11:29:13 PDT
Comment on attachment 345853 [details]
proposed patch.

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

> Source/JavaScriptCore/runtime/ArrayPrototype.cpp:1307
> +template<typename T, bool isDouble = std::is_same<T, double>::value>

why do you need isDouble?

> Source/JavaScriptCore/runtime/ArrayPrototype.cpp:1308
> +void copyElements(T* buffer, unsigned offset, void* source, unsigned sourceSize, IndexingType sourceType)

ALWAYS_INLINE?
Comment 3 Mark Lam 2018-07-26 11:30:14 PDT
Comment on attachment 345853 [details]
proposed patch.

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

>> Source/JavaScriptCore/runtime/ArrayPrototype.cpp:1307
>> +template<typename T, bool isDouble = std::is_same<T, double>::value>
> 
> why do you need isDouble?

Oops ... old code that is now solved by a superior method.  Will delete this.

>> Source/JavaScriptCore/runtime/ArrayPrototype.cpp:1308
>> +void copyElements(T* buffer, unsigned offset, void* source, unsigned sourceSize, IndexingType sourceType)
> 
> ALWAYS_INLINE?

OK.
Comment 4 Mark Lam 2018-07-26 11:33:05 PDT
Created attachment 345854 [details]
patch for landing.
Comment 5 Mark Lam 2018-07-26 12:50:06 PDT
Thanks for the review.  Landed in r234269: <http://trac.webkit.org/r234269>.