mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 05:49:12 +02:00
* Global memory object
This commit is contained in:
parent
50370ff56d
commit
2daf7f984f
@ -6,7 +6,7 @@
|
|||||||
see https://wiki.freepascal.org/WebAssembly/DOM
|
see https://wiki.freepascal.org/WebAssembly/DOM
|
||||||
}
|
}
|
||||||
{$IFNDEF FPC_DOTTEDUNITS}
|
{$IFNDEF FPC_DOTTEDUNITS}
|
||||||
unit JOB.Js;
|
unit job.js;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$mode ObjFPC}
|
{$mode ObjFPC}
|
||||||
@ -753,6 +753,7 @@ type
|
|||||||
|
|
||||||
TJSUint8Array = class(TJSTypedArray,IJSUint8Array)
|
TJSUint8Array = class(TJSTypedArray,IJSUint8Array)
|
||||||
public
|
public
|
||||||
|
Class function GetGlobal : TJSUint8Array;
|
||||||
class function JSClassName: UnicodeString; override;
|
class function JSClassName: UnicodeString; override;
|
||||||
class function Cast(const Intf: IJSObject): IJSUint8Array; overload;
|
class function Cast(const Intf: IJSObject): IJSUint8Array; overload;
|
||||||
end;
|
end;
|
||||||
@ -1485,6 +1486,13 @@ end;
|
|||||||
|
|
||||||
{ TJSUInt8Array }
|
{ TJSUInt8Array }
|
||||||
|
|
||||||
|
class function TJSUint8Array.GetGlobal: TJSUint8Array;
|
||||||
|
begin
|
||||||
|
// We must free it.
|
||||||
|
Result:=TJSUInt8Array.JOBCreateGlobal('InstanceMemory');
|
||||||
|
TJSUInt8Array(Result).FJOBObjectIDOwner:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
class function TJSUint8Array.JSClassName: UnicodeString;
|
class function TJSUint8Array.JSClassName: UnicodeString;
|
||||||
begin
|
begin
|
||||||
Result:='Uint8Array';
|
Result:='Uint8Array';
|
||||||
|
Loading…
Reference in New Issue
Block a user