* Fix compilation

This commit is contained in:
Michael Van Canneyt 2025-04-25 17:09:35 +02:00
parent 4e58143aa7
commit bf7d156c38

View File

@ -6,12 +6,12 @@ unit wasm.pas2js.websocket.worker;
interface interface
uses uses
JS, Rtl.WebThreads, weborworker, wasm.pas2js.websocketapi, wasm.websocket.shared; JS, Rtl.WebThreads, Rtl.WorkerCommands, weborworker, wasm.pas2js.websocketapi, wasm.websocket.shared;
type type
// When an unexpected error occurred. // When an unexpected error occurred.
TWebsocketSetMemCommand = class external name 'Object' (TWorkerCommand) TWebsocketSetMemCommand = class external name 'Object' (TCustomWorkerCommand)
public public
Buffer : TJSSharedArrayBuffer; Buffer : TJSSharedArrayBuffer;
end; end;
@ -57,6 +57,8 @@ type
implementation implementation
uses sysutils;
{ TWebsocketSetMemCommandHelper } { TWebsocketSetMemCommandHelper }
class function TWebsocketSetMemCommandHelper.CommandName: string; class function TWebsocketSetMemCommandHelper.CommandName: string;
@ -67,7 +69,7 @@ end;
class function TWebsocketSetMemCommandHelper.CreateNew(aBuffer : TJSSharedArrayBuffer; aThreadID: Integer): TWebsocketSetMemCommand; class function TWebsocketSetMemCommandHelper.CreateNew(aBuffer : TJSSharedArrayBuffer; aThreadID: Integer): TWebsocketSetMemCommand;
begin begin
Result:= TWebsocketSetMemCommand(TWorkerCommand.NewWorker(CommandName,aThreadID)); Result:= TWebsocketSetMemCommand(createCommand(CommandName,IntToStr(aThreadID)));
Result.Buffer:=aBuffer; Result.Buffer:=aBuffer;
end; end;