Bug 126754 - [JSC] Revise typed array implementations to match ECMAScript and WebGL Specification
Summary: [JSC] Revise typed array implementations to match ECMAScript and WebGL Specif...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on: 126803
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-10 09:00 PST by Brent Fulgham
Modified: 2014-01-11 18:47 PST (History)
7 users (show)

See Also:


Attachments
Patch (6.54 KB, patch)
2014-01-10 17:02 PST, Dean Jackson
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-01-10 09:00:07 PST
The ECMAScript specification requires that 'new' be used with DataView (see https://bugs.ecmascript.org/show_bug.cgi?id=695).

This was confirmed by discussion about the WebGL test suite (https://github.com/KhronosGroup/WebGL/issues/446).

Our DataView implementation should not allow use as a constructor function, and should require the use of 'new'.
Comment 1 Brent Fulgham 2014-01-10 09:54:47 PST
Ken Russel notes that this is true of all of the Typed Array constructors as well.
Comment 2 Radar WebKit Bug Importer 2014-01-10 09:54:58 PST
<rdar://problem/15793039>
Comment 3 Dean Jackson 2014-01-10 17:02:39 PST
Created attachment 220907 [details]
Patch
Comment 4 Dean Jackson 2014-01-10 17:06:20 PST
Committed r161702: <http://trac.webkit.org/changeset/161702>
Comment 5 Alexey Proskuryakov 2014-01-10 19:53:14 PST
This change broke four JS tests:

** The following JSC stress test failures have been introduced:
	jsc-layout-tests.yaml/js/script-tests/typedarray-constructors.js.layout
	jsc-layout-tests.yaml/js/script-tests/typedarray-constructors.js.layout-no-llint
	jsc-layout-tests.yaml/js/script-tests/typedarray-constructors.js.layout-no-cjit
	jsc-layout-tests.yaml/js/script-tests/typedarray-constructors.js.layout-dfg-eager-no-cjit

While this is probably expected, it makes the tree red.
Comment 6 Alexey Proskuryakov 2014-01-10 19:56:07 PST
And also fast/canvas/webgl/data-view-test.html.
Comment 7 WebKit Commit Bot 2014-01-10 20:00:08 PST
Re-opened since this is blocked by bug 126803
Comment 8 Brent Fulgham 2014-01-11 17:33:04 PST
I think all of these changes are expected, and should have been part of the patch. I'll correct and re-land.
Comment 9 Brent Fulgham 2014-01-11 18:41:16 PST
Comment on attachment 220907 [details]
Patch

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

> LayoutTests/js/script-tests/typedarray-constructors.js:7
> +shouldNotThrow("new Int8Array()");

It turns out that 'shouldNotThrow' is NOT part of "standalone-pre.js", which is what's used for the JSC stress tests.
Comment 10 Brent Fulgham 2014-01-11 18:47:27 PST
Committed r161789: <http://trac.webkit.org/changeset/161789>