// Copyright 2015 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// First test casefunctionFirstBuffer(){}FirstBuffer.prototype.__proto__=Uint8Array.prototypeFirstBuffer.__proto__=Uint8Arrayvarbuf=newUint8Array(10)buf.__proto__=FirstBuffer.prototypevarbuf2=buf.subarray(2)assertEquals(8,buf2.length);// Second test casefunctionSecondBuffer(arg){vararr=newUint8Array(arg)arr.__proto__=SecondBuffer.prototypereturnarr}SecondBuffer.prototype.__proto__=Uint8Array.prototypeSecondBuffer.__proto__=Uint8Arrayvarbuf3=newSecondBuffer(10)varbuf4=buf3.subarray(2)assertEquals(8,buf4.length);