Changeset 161702 in webkit


Ignore:
Timestamp:
Jan 10, 2014, 5:09:58 PM (12 years ago)
Author:
dino@apple.com
Message:

[JSC] Revise typed array implementations to match ECMAScript and WebGL Specification
https://bugs.webkit.org/show_bug.cgi?id=126754

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

The ECMAScript specification forbids calling the typed array
constructors without using "new". Change the call data to return
none so we throw and exception in these cases.

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::getCallData):

LayoutTests:

New test which checks that we throw an exception when calling
any of the typed array constructors without using "new".

  • js/script-tests/typedarray-constructors.js: Added.
  • js/typedarray-constructors-expected.txt: Added.
  • js/typedarray-constructors.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r161696 r161702  
     12014-01-10  Dean Jackson  <dino@apple.com>
     2
     3        [JSC] Revise typed array implementations to match ECMAScript and WebGL Specification
     4        https://bugs.webkit.org/show_bug.cgi?id=126754
     5
     6        Reviewed by Filip Pizlo.
     7
     8        New test which checks that we throw an exception when calling
     9        any of the typed array constructors without using "new".
     10
     11        * js/script-tests/typedarray-constructors.js: Added.
     12        * js/typedarray-constructors-expected.txt: Added.
     13        * js/typedarray-constructors.html: Added.
     14
    1152014-01-10  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/Source/JavaScriptCore/ChangeLog

    r161699 r161702  
     12014-01-10  Dean Jackson  <dino@apple.com>
     2
     3        [JSC] Revise typed array implementations to match ECMAScript and WebGL Specification
     4        https://bugs.webkit.org/show_bug.cgi?id=126754
     5
     6        Reviewed by Filip Pizlo.
     7
     8        The ECMAScript specification forbids calling the typed array
     9        constructors without using "new". Change the call data to return
     10        none so we throw and exception in these cases.
     11
     12        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
     13        (JSC::JSGenericTypedArrayViewConstructor<ViewClass>::getCallData):
     14
    1152014-01-10  Benjamin Poulain  <bpoulain@apple.com>
    216
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h

    r156624 r161702  
    158158{
    159159    callData.native.function = constructGenericTypedArrayView<ViewClass>;
    160     return CallTypeHost;
     160    return CallTypeNone;
    161161}
    162162
Note: See TracChangeset for help on using the changeset viewer.