Commit e34e5271 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

Fix too restrictive check in Map::MapVerify

Bug: chromium:1025468, chromium:1028396
Change-Id: I76f75b4137e2c166a1f89fd9f2e88330281c7625
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1936467Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65169}
parent edd50ad2
......@@ -458,12 +458,13 @@ void Map::MapVerify(Isolate* isolate) {
CHECK(!parent.owns_descriptors());
} else {
CHECK_EQ(NumberOfOwnDescriptors(), parent.NumberOfOwnDescriptors());
// Descriptors sharing through special transitions takes over
// Descriptors sharing through special transitions properly takes over
// ownership from the parent map unless it uses the canonical empty
// descriptor array.
CHECK_IMPLIES(
descriptors != ReadOnlyRoots(isolate).empty_descriptor_array(),
!parent.owns_descriptors());
if (descriptors != ReadOnlyRoots(isolate).empty_descriptor_array()) {
CHECK_IMPLIES(owns_descriptors(), !parent.owns_descriptors());
CHECK_IMPLIES(parent.owns_descriptors(), !owns_descriptors());
}
}
}
}
......
// Copyright 2019 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.
// Flags: --expose-gc
(function () {
var GeneratorFunction = function* () {}.constructor;
class MyFunc extends GeneratorFunction {
constructor(...args) {
super(...args);
this.o = {};
this.o = {};
}
}
var f = new MyFunc("'use strict'; yield 153;");
gc();
var f = new MyFunc("'use strict'; yield 153;");
})();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment