diff options
Diffstat (limited to 'test/built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-access-throws.js')
-rw-r--r-- | test/built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-access-throws.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-access-throws.js b/test/built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-access-throws.js index aaad50a4b..fe6d62859 100644 --- a/test/built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-access-throws.js +++ b/test/built-ins/TypedArrays/typedarray-arg-other-ctor-buffer-ctor-access-throws.js @@ -25,9 +25,8 @@ includes: [testTypedArray.js] ---*/ testWithTypedArrayConstructors(function(TA) { - var sample1 = Int8Array; - var sample2 = Int16Array; - var sample = new (TA === Int8Array ? sample2 : sample1); + var OtherCtor = TA === Int8Array ? Int16Array : Int8Array; + var sample = new OtherCtor(); Object.defineProperty(sample.buffer, "constructor", { get() { |