Add bytecode validity check on SetHook (#439)

This commit is contained in:
tequ
2025-02-24 17:26:31 +09:00
committed by GitHub
parent 92be8146e8
commit 8b29fc5ee1

View File

@@ -1467,6 +1467,10 @@ public:
retval.emplace(str);
JS_FreeCString(ctx, str);
}
else
{
retval.emplace("invalid bytecode");
}
JS_FreeValue(ctx, obj);
return retval;
@@ -1480,6 +1484,10 @@ public:
retval.emplace(str);
JS_FreeCString(ctx, str);
}
else
{
retval.emplace("bytecode eval failure");
}
JS_FreeValue(ctx, val);
//JS_FreeValue(ctx, obj);