From f8ff3a5b94dfa2e3ec5c3d5fd543cf390821fc7b Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Tue, 3 Sep 2024 19:31:44 +0100 Subject: [PATCH] Clean up error handling for `JS_ToBool`. --- src/Generator/Generators/QuickJS/QuickJSMarshal.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Generator/Generators/QuickJS/QuickJSMarshal.cs b/src/Generator/Generators/QuickJS/QuickJSMarshal.cs index 1ec7e7330..43fda6c9b 100644 --- a/src/Generator/Generators/QuickJS/QuickJSMarshal.cs +++ b/src/Generator/Generators/QuickJS/QuickJSMarshal.cs @@ -509,8 +509,6 @@ public bool VisitPrimitiveType(PrimitiveType primitive) case PrimitiveType.Bool: Context.Before.WriteLine($"{argName} = JS_ToBool(ctx, argv[{Context.ParameterIndex}]);"); - Context.Before.WriteLine($"if ({argName} == -1)"); - Context.Before.WriteLineIndent("return JS_EXCEPTION;"); Context.Return.Write($"{argName}"); return true;