Bug 126032 - Revise WebGL DataView test to match ECMAScript Draft Specification
Summary: Revise WebGL DataView test to match ECMAScript Draft Specification
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on: 126475
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-19 17:03 PST by Brent Fulgham
Modified: 2014-01-10 08:54 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.52 KB, patch)
2013-12-19 17:11 PST, Brent Fulgham
dino: 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 2013-12-19 17:03:45 PST
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.
Comment 1 Brent Fulgham 2013-12-19 17:06:14 PST
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."
Comment 2 Brent Fulgham 2013-12-19 17:11:06 PST
Created attachment 219708 [details]
Patch
Comment 3 Brent Fulgham 2013-12-19 17:18:34 PST
<rdar://problem/15201835>
Comment 4 Dean Jackson 2014-01-03 11:03:48 PST
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?
Comment 5 Brent Fulgham 2014-01-03 11:43:43 PST
(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!
Comment 6 Brent Fulgham 2014-01-03 11:43:51 PST
Committed r161274: <http://trac.webkit.org/changeset/161274>
Comment 7 Dean Jackson 2014-01-03 16:06:07 PST
After more discussion with EMCA folk, it looks like this was an incorrect change.
Comment 8 WebKit Commit Bot 2014-01-03 17:12:57 PST
Re-opened since this is blocked by bug 126475
Comment 9 Brent Fulgham 2014-01-10 08:54:50 PST
After further review, this change is incorrect. We need to modify the behavior of DataView.