Skip to content

Commit

Permalink
Clean up error handling for JS_ToBool.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Sep 3, 2024
1 parent e5a1942 commit f8ff3a5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/Generator/Generators/QuickJS/QuickJSMarshal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f8ff3a5

Please sign in to comment.