1// Copyright 2015 the V8 project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5'use strict'; 6 7var typedArray = new Int8Array(1); 8var saved; 9var called; 10class TypedArraySubclass extends Int8Array { 11 constructor(x) { 12 super(x); 13 called = true; 14 saved = x; 15 } 16} 17typedArray.constructor = TypedArraySubclass 18typedArray.map(function(){}); 19 20assertTrue(called); 21assertEquals(saved, 1); 22