mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibJS: Remove Object::value_of()
Being really close to Object.prototype.valueOf() name wise makes this unnecessarily confusing - while it sometimes serves as the implementation of a valueOf() function, it's an abstraction which the spec doesn't have. Use the appropriate getters to retrieve specific internal slots instead, most commonly [[FooData]] from the primitive wrapper objects. For the Object class specifically, use the Value(Object*) ctor instead.
This commit is contained in:
parent
07c5419a82
commit
038d354b5d
14 changed files with 20 additions and 38 deletions
|
@ -364,7 +364,7 @@ Value SuperCall::execute(Interpreter& interpreter, GlobalObject& global_object)
|
|||
return {};
|
||||
|
||||
// 5. If IsConstructor(func) is false, throw a TypeError exception.
|
||||
if (!func || !func->value_of().is_constructor()) {
|
||||
if (!func || !Value(func).is_constructor()) {
|
||||
vm.throw_exception<TypeError>(global_object, ErrorType::NotAConstructor, "Super constructor");
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue