From 2adb8cc8133b35b006f55a5e59c15a714bdc6791 Mon Sep 17 00:00:00 2001 From: "F. Perana" <24318949+fperana@users.noreply.github.com> Date: Mon, 16 Feb 2026 18:31:40 +0100 Subject: [PATCH 1/3] Fixed type mismatch between declaration and implementation When compiling packages for 64bit IDE, the TWiRLResourceModuleWizard.GetGlyph method is declared with different return types for WIN32 and WIN64, but the implementation didn't have such distinction --- Source/IDE Wizard/WiRL.Wizards.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/IDE Wizard/WiRL.Wizards.pas b/Source/IDE Wizard/WiRL.Wizards.pas index b20adab..c2459f3 100644 --- a/Source/IDE Wizard/WiRL.Wizards.pas +++ b/Source/IDE Wizard/WiRL.Wizards.pas @@ -264,7 +264,7 @@ function TWiRLResourceModuleWizard.GetGalleryCategory: IOTAGalleryCategory; Result := (BorlandIDEServices as IOTAGalleryCategoryManager).FindCategory(SIDString); end; -function TWiRLResourceModuleWizard.GetGlyph: Cardinal; +function TWiRLResourceModuleWizard.GetGlyph: {$IFDEF WIN32}Cardinal{$ELSE}UInt64{$ENDIF}; begin { TODO : function TWiRLServeProjectWizard.GetGlyph: Cardinal; } Result := LoadIcon(HInstance, 'WiRLServerWizardIcon'); From ee79fff1a867bc4ca4fcdb90557741bf5cb99884 Mon Sep 17 00:00:00 2001 From: "F. Perana" <24318949+fperana@users.noreply.github.com> Date: Mon, 16 Feb 2026 18:25:59 +0100 Subject: [PATCH 2/3] Fixed memory leak Fixed a memory keak when creating a new EWiRLWebApplicationException with the parameter Data (the inner Data object was leaked) --- Source/Core/WiRL.Core.Exceptions.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/WiRL.Core.Exceptions.pas b/Source/Core/WiRL.Core.Exceptions.pas index bf31ff3..a587c97 100755 --- a/Source/Core/WiRL.Core.Exceptions.pas +++ b/Source/Core/WiRL.Core.Exceptions.pas @@ -372,7 +372,10 @@ constructor EWiRLWebApplicationException.Create(const AMessage: string; AStatus: Create(AMessage, AStatus); if Assigned(AData) then + begin + FData.Free; FData := (AData.Clone as TJSONObject); + end; end; constructor EWiRLWebApplicationException.Create(AInnerException: Exception; From f5b54aca81a1ea6a317ec0286813be8b69211db6 Mon Sep 17 00:00:00 2001 From: "F. Perana" <24318949+fperana@users.noreply.github.com> Date: Mon, 16 Feb 2026 18:29:39 +0100 Subject: [PATCH 3/3] Fixed double occurrence of "exception" element When serializing exceptions, the dedicated messagebodywriter adds an "exception" element carrying the exception's class name, but the custom EWiRLWebApplicationException already has this property, resulting in double occurrence. --- Source/Core/WiRL.Core.MessageBody.Default.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/WiRL.Core.MessageBody.Default.pas b/Source/Core/WiRL.Core.MessageBody.Default.pas index b4092ca..653f3cb 100644 --- a/Source/Core/WiRL.Core.MessageBody.Default.pas +++ b/Source/Core/WiRL.Core.MessageBody.Default.pas @@ -674,7 +674,9 @@ procedure TWiRLExceptionWriter.WriteTo(const AValue: TValue; const AAttributes: LErr := AValue.AsObject as Exception; LJSON := TNeon.ObjectToJSON(LErr, LConfig); try - (LJSON as TJSONObject).AddPair('exception', LErr.ClassName); + // Don't add 'exception' pair for EWiRLWebApplicationException (already has its own Exception property) + if not (LErr is EWiRLWebApplicationException) then + (LJSON as TJSONObject).AddPair('exception', LErr.ClassName); if FWiRLConfigErrors.ErrorDebugInfo then begin // Using TNeonCase algorithm