Implement NamedPropertyHandler API to ObjectTemplate

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2020-07-20 21:51:41 +09:00 committed by Boram Bae
commit 25588dcb01
37 changed files with 831 additions and 254 deletions

View file

@ -84,7 +84,7 @@ static Value builtinArrayBufferSlice(ExecutionState& state, Value thisValue, siz
Value constructor = obj->speciesConstructor(state, state.context()->globalObject()->arrayBuffer());
Value arguments[] = { Value(newLen) };
Object* newValue = Object::construct(state, constructor, 1, arguments);
Object* newValue = Object::construct(state, constructor, 1, arguments).toObject(state);
if (!newValue->isArrayBufferObject()) {
ErrorObject::throwBuiltinError(state, ErrorObject::TypeError, state.context()->staticStrings().ArrayBuffer.string(), true, state.context()->staticStrings().slice.string(), "%s: return value of constructor ArrayBuffer is not valid ArrayBuffer");
}