Although the original WebGL specification declared the following syntax illegal: // Use try/catch instead of calling shouldThrow to avoid different exception message being reported from different platform. try { expr = DataView(new ArrayBuffer); TestEval(expr); testFailed(expr + " does not throw exception"); } catch (e) { testPassed(expr + " threw exception"); } ... this was later superseded by the language in the ECMAScript 6 Draft Specification, which allows DataView to be used as a function returning a constructed DataView object (see http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts for the current draft). See http://people.mozilla.org/~jorendorff/es6-draft.html#sec-dataview-constructor for an HTML version of the document.
Specific language: "The DataView constructor is the %DataView% intrinsic object and the initial value of the DataView property of the global object. When DataView is called as a function rather than as a constructor, it initialises its this value with the internal state necessary to support the DataView.prototype internal methods."
Created attachment 219708 [details] Patch
<rdar://problem/15201835>
Comment on attachment 219708 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=219708&action=review > LayoutTests/ChangeLog:6 > + Revise WebGL DataView test to match ECMAScript Draft Specification > + https://bugs.webkit.org/show_bug.cgi?id=126032 > + > + Reviewed by NOBODY (OOPS!). Could you note here that we believe this is a bug in the test, and we'll try to get it fixed upstream?
(In reply to comment #4) > (From update of attachment 219708 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=219708&action=review > > > LayoutTests/ChangeLog:6 > > + Revise WebGL DataView test to match ECMAScript Draft Specification > > + https://bugs.webkit.org/show_bug.cgi?id=126032 > > + > > + Reviewed by NOBODY (OOPS!). > > Could you note here that we believe this is a bug in the test, and we'll try to get it fixed upstream? Done!
Committed r161274: <http://trac.webkit.org/changeset/161274>
After more discussion with EMCA folk, it looks like this was an incorrect change.
Re-opened since this is blocked by bug 126475
After further review, this change is incorrect. We need to modify the behavior of DataView.