v8/test/mjsunit/regress/regress-615776.js
gsathya a7d091ffe3 math.js: Use %_TypedArrayGetLength to get length
https://codereview.chromium.org/2001393004 makes TypedArray
length property writable, which means we shouldn't depend on it.
Instead, use %_TypedArrayGetLength% to get length.

Attached regression test.

BUG=chromium:615776

Review-Url: https://codereview.chromium.org/2020203006
Cr-Commit-Position: refs/heads/master@{#36655}
2016-06-01 18:44:30 +00:00

15 lines
412 B
JavaScript

// Copyright 2016 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.
Object.defineProperty(Int32Array.prototype.__proto__, 'length', {
get: function() { throw new Error('Custom length property'); }
});
var a = Math.random();
// This tests MathRandomRaw.
var v0 = new Set();
var v1 = new Object();
v0.add(v1);