mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Reimplement [[SetPrototypeOf]](V) and Object.setPrototypeOf(O, proto) according to 6.0 (#377)
* Don't throw type error with Reflect.setPrototypeOf * Pass more test262 tests Signed-off-by: Boram Bae <boram21.bae@samsung.com>
This commit is contained in:
parent
850fde59c2
commit
8e4f170f3f
5 changed files with 66 additions and 38 deletions
|
|
@ -672,10 +672,6 @@ bool ProxyObject::setPrototype(ExecutionState& state, const Value& value)
|
|||
bool booleanTrapResult;
|
||||
Value arguments[] = { target, value };
|
||||
booleanTrapResult = Object::call(state, trap, handler, 2, arguments).toBoolean(state);
|
||||
if (!booleanTrapResult) {
|
||||
ErrorObject::throwBuiltinError(state, ErrorObject::TypeError, strings->Proxy.string(), false, String::emptyString, "%s: Proxy setPrototypeOf could not set the prototype.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 11. Let extensibleTarget be IsExtensible(target).
|
||||
bool extensibleTarget = target.asObject()->isExtensible(state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue