* Introduce InstanceBuffer

This commit is contained in:
Michael Van Canneyt 2024-06-26 14:18:30 +02:00
parent 86ac1eaf30
commit 511d4cd282

View File

@ -267,9 +267,11 @@ end;
function TJSObjectBridge.FindGlobalObject(const aName: string): TJOBObjectID; function TJSObjectBridge.FindGlobalObject(const aName: string): TJOBObjectID;
begin begin
// this one is special, it needs to be re-registered every time // these two are special, it needs to be re-registered every time
if aName='InstanceMemory' then if aName='InstanceMemory' then
Exit(RegisterLocalObject(TJSUint8Array.New(getModuleMemoryDataView.buffer))) Exit(RegisterLocalObject(TJSUint8Array.New(getModuleMemoryDataView.buffer)))
else if aName='InstanceBuffer' then
Exit(RegisterLocalObject(getModuleMemoryDataView.buffer))
else else
begin begin
if not FGlobalNames.hasOwnProperty(aName) then if not FGlobalNames.hasOwnProperty(aName) then