Commit 6d2c5fca authored by verwaest's avatar verwaest Committed by Commit bot

Walk the hidden prototype chain in SetSuperProperty

Otherwise e.g.,
"use strict";
class C { static f() { super.location = "http://bla.com" }}
C.f.call(this);

will mask location on the hidden prototype of the JSGlobalObject.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34432}
parent 879b617b
......@@ -4257,7 +4257,7 @@ Maybe<bool> Object::SetSuperProperty(LookupIterator* it, Handle<Object> value,
}
Handle<JSReceiver> receiver = Handle<JSReceiver>::cast(it->GetReceiver());
LookupIterator::Configuration c = LookupIterator::OWN;
LookupIterator::Configuration c = LookupIterator::HIDDEN;
LookupIterator own_lookup =
it->IsElement() ? LookupIterator(isolate, receiver, it->index(), c)
: LookupIterator(receiver, it->name(), c);
......
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