Commit 77e30f01 authored by verwaest's avatar verwaest Committed by Commit bot

[classes] Support AccessorInfo-style data properties in super property stores.

BUG=

Review URL: https://codereview.chromium.org/1711813003

Cr-Commit-Position: refs/heads/master@{#34163}
parent ed665880
......@@ -4283,8 +4283,16 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
}
break;
case LookupIterator::INTEGER_INDEXED_EXOTIC:
case LookupIterator::ACCESSOR:
if (own_lookup.GetAccessors()->IsAccessorInfo()) {
if (own_lookup.IsReadOnly()) {
return WriteToReadOnlyProperty(&own_lookup, value, should_throw);
}
return JSObject::SetPropertyWithAccessor(&own_lookup, value,
should_throw);
}
// Fall through.
case LookupIterator::INTEGER_INDEXED_EXOTIC:
return RedefineIncompatibleProperty(isolate, it->GetName(), value,
should_throw);
......
// 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.
"use strict";
class Test {
m() {
super.length = 10;
}
}
var array = [];
Test.prototype.m.call(array);
assertEquals(10, array.length);
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