Commit b83edcc8 authored by ishell's avatar ishell Committed by Commit bot

[runtime] Don't crash when creating an instance of a class inherited from a Proxy.

BUG=v8:4972
LOG=N

Review-Url: https://codereview.chromium.org/1925803005
Cr-Commit-Position: refs/heads/master@{#35911}
parent 45f52fcb
......@@ -13164,7 +13164,9 @@ void JSFunction::CalculateInstanceSizeForDerivedClass(
for (PrototypeIterator iter(isolate, this,
PrototypeIterator::START_AT_RECEIVER);
!iter.IsAtEnd(); iter.Advance()) {
JSFunction* func = iter.GetCurrent<JSFunction>();
JSReceiver* current = iter.GetCurrent<JSReceiver>();
if (!current->IsJSFunction()) break;
JSFunction* func = JSFunction::cast(current);
SharedFunctionInfo* shared = func->shared();
expected_nof_properties += shared->expected_nof_properties();
if (!IsSubclassConstructor(shared->kind())) {
......
// 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.
new class extends new Proxy(class {},{}) {}
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