4fa7ae1c07
They both now run fast (due to utilizing transitions instead of always creating new maps) and sealed or non-extensible objects can stay in fast mode after transitioning. This almost entirely reuses the code for transitioning objects frozen by Object.freeze(), with the added benefit of freeing up a bit on the map (we no longer keep track of frozen-ness, as that bit wasn't used for anything interesting). BUG=v8:3662,chromium:115960 LOG=y Review URL: https://codereview.chromium.org/776143005 Cr-Commit-Position: refs/heads/master@{#25759}
7 lines
224 B
JavaScript
7 lines
224 B
JavaScript
// Copyright 2014 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.freeze(this);
|
|
assertTrue(Object.isFrozen(this));
|