mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibJS: Consider non-extensible objects in Reflect.setPrototypeOf()
This commit is contained in:
committed by
Andreas Kling
parent
c1248a7fd8
commit
b32761f2e0
@@ -261,9 +261,7 @@ Value ReflectObject::set_prototype_of(Interpreter& interpreter)
|
||||
Object* prototype = nullptr;
|
||||
if (!prototype_value.is_null())
|
||||
prototype = const_cast<Object*>(&prototype_value.as_object());
|
||||
target->set_prototype(prototype);
|
||||
// FIXME: Needs to return false for prototype chain cycles and non-extensible objects (don't have those yet).
|
||||
return Value(true);
|
||||
return Value(target->set_prototype(prototype));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user