From 4bc0d8e4c8a6b832bcd580dac7d5d2c76b8272eb Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Tue, 28 Feb 2023 19:55:11 +0000 Subject: [PATCH] LibJS: Fix compilation of operator= for JS::SafeFunction operator= for JS::SafeFunction was missing the CallableKind parameter in the call to init_with_callable. This was not picked up before as nothing used operator= on JS::SafeFunction. --- Userland/Libraries/LibJS/SafeFunction.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibJS/SafeFunction.h b/Userland/Libraries/LibJS/SafeFunction.h index 0db4df7dd4..48408ed544 100644 --- a/Userland/Libraries/LibJS/SafeFunction.h +++ b/Userland/Libraries/LibJS/SafeFunction.h @@ -88,7 +88,7 @@ public: requires((AK::IsFunctionObject && IsCallableWithArguments)) { clear(); - init_with_callable(forward(callable)); + init_with_callable(forward(callable), CallableKind::FunctionObject); return *this; } @@ -98,7 +98,7 @@ public: { clear(); if (f) - init_with_callable(move(f)); + init_with_callable(move(f), CallableKind::FunctionPointer); return *this; }