Bug 163795 - WebGLRenderingContextBase.bufferData() should use a union instead of overloading
Summary: WebGLRenderingContextBase.bufferData() should use a union instead of overloading
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 163764 163816
Blocks: 163791
  Show dependency treegraph
 
Reported: 2016-10-21 10:02 PDT by Chris Dumez
Modified: 2016-10-27 09:27 PDT (History)
4 users (show)

See Also:


Attachments
Patch (38.78 KB, patch)
2016-10-22 11:00 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (38.80 KB, patch)
2016-10-22 12:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.