From f4867572b7bdc13c3d868b297257c23de3d1aee0 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 25 Jun 2021 18:37:14 +0100 Subject: LibJS: Change PropertyName(Symbol*) => PropertyName(Symbol&) Requires a bunch of find-and-replace updates across LibJS, but constructing a PropertyName from a nullptr Symbol* should not be possible - let's enforce this at the compiler level instead of using VERIFY() (and already dereference Symbol pointers at the call site). --- Userland/Libraries/LibJS/Runtime/MathObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibJS/Runtime/MathObject.cpp') diff --git a/Userland/Libraries/LibJS/Runtime/MathObject.cpp b/Userland/Libraries/LibJS/Runtime/MathObject.cpp index b20491b797..cf15d6e280 100644 --- a/Userland/Libraries/LibJS/Runtime/MathObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/MathObject.cpp @@ -71,7 +71,7 @@ void MathObject::initialize(GlobalObject& global_object) define_property(vm.names.SQRT2, Value(M_SQRT2), 0); // 21.3.1.9 Math [ @@toStringTag ], https://tc39.es/ecma262/#sec-math-@@tostringtag - define_property(vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.Math.as_string()), Attribute::Configurable); + define_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), vm.names.Math.as_string()), Attribute::Configurable); } MathObject::~MathObject() -- cgit v1.2.3