Bug 163795

Summary: WebGLRenderingContextBase.bufferData() should use a union instead of overloading
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, sam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 163764, 163816    
Bug Blocks: 163791    
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2016-10-21 10:02:05 PDT
WebGLRenderingContextBase.bufferData() should use a union instead of overloading:
- https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14
Comment 1 Chris Dumez 2016-10-22 11:00:27 PDT
Created attachment 292501 [details]
Patch
Comment 2 Darin Adler 2016-10-22 12:20:22 PDT
Comment on attachment 292501 [details]
Patch

Looks good, but GTK and EFL builds are failing.
Comment 3 Chris Dumez 2016-10-22 12:55:59 PDT
Created attachment 292504 [details]
Patch
Comment 4 WebKit Commit Bot 2016-10-22 13:49:21 PDT
Comment on attachment 292504 [details]
Patch

Clearing flags on attachment: 292504

Committed r207715: <http://trac.webkit.org/changeset/207715>
Comment 5 WebKit Commit Bot 2016-10-22 13:49:25 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Filip Pizlo 2016-10-27 09:27:06 PDT
Comment on attachment 292504 [details]
Patch

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

> Source/JavaScriptCore/runtime/JSArrayBuffer.h:80
> +inline ArrayBuffer* JSArrayBuffer::toWrapped(JSValue value)
> +{
> +    return toArrayBuffer(value);
> +}
> +

FYI, this method, and its goal of reducing special handling of ArrayBuffer contradicts https://bugs.webkit.org/show_bug.cgi?id=163986 (SharedArrayBuffer), which requires us to increase the special handling of ArrayBuffer.  It's going to be necessary for clients of ArrayBuffer to state at the point of use if they are OK with the buffer being shared so that we don't accidentally use a shared array buffer in a context where it would not be safe to do so.