support for delphi 11.1
This commit is contained in:
@@ -6,10 +6,10 @@ unit SpiderMonkey;
|
||||
{
|
||||
This file is part of Synopse framework.
|
||||
|
||||
Synopse framework. Copyright (C) 2020 Arnaud Bouchez
|
||||
Synopse framework. Copyright (C) 2022 Arnaud Bouchez
|
||||
Synopse Informatique - http://synopse.info
|
||||
|
||||
SyNode for mORMot Copyright (C) 2020 Pavel Mashlyakovsky & Vadim Orel
|
||||
SyNode for mORMot Copyright (C) 2022 Pavel Mashlyakovsky & Vadim Orel
|
||||
pavel.mash at gmail.com
|
||||
|
||||
*** BEGIN LICENSE BLOCK *****
|
||||
@@ -26,7 +26,7 @@ unit SpiderMonkey;
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Pavel Mashlyakovsky & Vadim Orel.
|
||||
Portions created by the Initial Developer are Copyright (C) 2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2022
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
@@ -1,10 +1,10 @@
|
||||
{
|
||||
This file is part of Synopse framework.
|
||||
|
||||
Synopse framework. Copyright (C) 2020 Arnaud Bouchez
|
||||
Synopse framework. Copyright (C) 2022 Arnaud Bouchez
|
||||
Synopse Informatique - http://synopse.info
|
||||
|
||||
Scripting support for mORMot Copyright (C) 2020 Pavel Mashlyakovsky
|
||||
Scripting support for mORMot Copyright (C) 2022 Pavel Mashlyakovsky
|
||||
pavel.mash at gmail.com
|
||||
|
||||
*** BEGIN LICENSE BLOCK *****
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Pavel Mashlyakovsky.
|
||||
Portions created by the Initial Developer are Copyright (C) 2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2022
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
@@ -6,10 +6,10 @@ unit SyNode;
|
||||
{
|
||||
This file is part of Synopse framework.
|
||||
|
||||
Synopse framework. Copyright (C) 2020 Arnaud Bouchez
|
||||
Synopse framework. Copyright (C) 2022 Arnaud Bouchez
|
||||
Synopse Informatique - http://synopse.info
|
||||
|
||||
SyNode for mORMot Copyright (C) 2020 Pavel Mashlyakovsky & Vadim Orel
|
||||
SyNode for mORMot Copyright (C) 2022 Pavel Mashlyakovsky & Vadim Orel
|
||||
pavel.mash at gmail.com
|
||||
|
||||
Some ideas taken from
|
||||
@@ -30,7 +30,7 @@ unit SyNode;
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Pavel Mashlyakovsky.
|
||||
Portions created by the Initial Developer are Copyright (C) 2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2022
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -383,7 +383,7 @@ type
|
||||
FEngineClass: TSMEngineClass;
|
||||
|
||||
/// List of loaded dll modules
|
||||
FDllModules: TRawUTF8ListHashedLocked;
|
||||
FDllModules: TRawUTF8List;
|
||||
/// Path to core modules
|
||||
FCoreModulesPath: RawUTF8;
|
||||
FEngineExpireTimeOutTicks: Int64;
|
||||
@@ -559,7 +559,7 @@ const
|
||||
);
|
||||
|
||||
var
|
||||
GlobalSyNodeBindingHandlers: TRawUTF8ListHashedLocked;
|
||||
GlobalSyNodeBindingHandlers: TRawUTF8List;
|
||||
|
||||
/// handle errors from JavaScript. Just call DoProcessJSError of corresponding TSMEngine
|
||||
// to set TSMEngine error properties
|
||||
@@ -1116,7 +1116,7 @@ class procedure TSMEngineManager.RegisterBinding(const Name: RawUTF8;
|
||||
const handler: TSMProcessBindingHandler);
|
||||
begin
|
||||
if GlobalSyNodeBindingHandlers = nil then
|
||||
GlobalSyNodeBindingHandlers := TRawUTF8ListHashedLocked.Create(false);
|
||||
GlobalSyNodeBindingHandlers := TRawUTF8List.Create(false);
|
||||
GlobalSyNodeBindingHandlers.AddObject(Name, TObject(@handler));
|
||||
end;
|
||||
|
||||
@@ -1125,7 +1125,7 @@ var
|
||||
obj: TObject;
|
||||
handler: TSMProcessBindingHandler absolute obj;
|
||||
begin
|
||||
obj := GlobalSyNodeBindingHandlers.GetObjectByName(Name);
|
||||
obj := GlobalSyNodeBindingHandlers.GetObjectFrom(Name);
|
||||
result := handler;
|
||||
end;
|
||||
|
||||
@@ -1153,7 +1153,7 @@ begin
|
||||
{$ifdef ISDELPHIXE2}
|
||||
FRttiCx := TRttiContext.Create();
|
||||
{$endif}
|
||||
FDllModules := TRawUTF8ListHashedLocked.Create();
|
||||
FDllModules := TRawUTF8List.Create();
|
||||
FCoreModulesPath := aCoreModulesPath;
|
||||
FWorkersManager := TJSWorkersManager.Create;
|
||||
end;
|
||||
@@ -1261,7 +1261,7 @@ begin
|
||||
cx.BeginRequest;
|
||||
try
|
||||
dirname := ExtractFilePath(UTF8ToString(filename)) ;
|
||||
ModuleRec := PDllModuleRec(FDllModules.GetObjectByName(filename));
|
||||
ModuleRec := PDllModuleRec(FDllModules.GetObjectFrom(filename));
|
||||
if ModuleRec = nil then begin
|
||||
fHandle := {$IFDEF FPC}dynlibs.{$ENDIF}SafeLoadLibrary(UTF8ToString(filename));
|
||||
if fHandle=0 then
|
||||
@@ -1422,7 +1422,7 @@ begin
|
||||
try
|
||||
i := ThreadEngineIndex(aThreadID);
|
||||
if i>=0 then begin
|
||||
(FEnginePool[i] as TSMEngine).GarbageCollect;
|
||||
(TObject(FEnginePool[i]) as TSMEngine).GarbageCollect;
|
||||
FEnginePool.Delete(i);
|
||||
end;
|
||||
finally
|
||||
|
@@ -670,7 +670,7 @@ begin
|
||||
end;
|
||||
|
||||
stream := TFileStream.Create(filePath, fmOpenReadWrite);
|
||||
stream.Seek(0, soFromEnd);
|
||||
stream.Seek(0, soEnd);
|
||||
writer := SynCommons.TTextWriter.Create(stream, 65536);
|
||||
try
|
||||
vp.rval := SyNodeReadWrite.SMWrite_impl(cx, argc - 1, @in_argv[1], writer);
|
||||
|
@@ -5,10 +5,10 @@ unit SyNodeNewProto;
|
||||
{
|
||||
This file is part of Synopse framework.
|
||||
|
||||
Synopse framework. Copyright (C) 2020 Arnaud Bouchez
|
||||
Synopse framework. Copyright (C) 2022 Arnaud Bouchez
|
||||
Synopse Informatique - http://synopse.info
|
||||
|
||||
SyNode for mORMot Copyright (C) 2020 Pavel Mashlyakovsky & Vadim Orel
|
||||
SyNode for mORMot Copyright (C) 2022 Pavel Mashlyakovsky & Vadim Orel
|
||||
pavel.mash at gmail.com
|
||||
|
||||
Some ideas taken from
|
||||
@@ -29,7 +29,7 @@ unit SyNodeNewProto;
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Pavel Mashlyakovsky.
|
||||
Portions created by the Initial Developer are Copyright (C) 2020
|
||||
Portions created by the Initial Developer are Copyright (C) 2022
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
|
@@ -5,10 +5,10 @@ unit SyNodeProto;
|
||||
{
|
||||
This file is part of Synopse framework.
|
||||
|
||||
Synopse framework. Copyright (C) 2020 Arnaud Bouchez
|
||||
Synopse framework. Copyright (C) 2022 Arnaud Bouchez
|
||||
Synopse Informatique - http://synopse.info
|
||||
|
||||
SyNode for mORMot Copyright (C) 2020 Pavel Mashlyakovsky & Vadim Orel
|
||||
SyNode for mORMot Copyright (C) 2022 Pavel Mashlyakovsky & Vadim Orel
|
||||
pavel.mash at gmail.com
|
||||
|
||||
Some ideas taken from
|
||||
|
@@ -5,10 +5,10 @@ unit SyNodeRemoteDebugger;
|
||||
{
|
||||
This file is part of Synopse framework.
|
||||
|
||||
Synopse framework. Copyright (C) 2020 Arnaud Bouchez
|
||||
Synopse framework. Copyright (C) 2022 Arnaud Bouchez
|
||||
Synopse Informatique - http://synopse.info
|
||||
|
||||
SyNode for mORMot Copyright (C) 2020 Pavel Mashlyakovsky & Vadim Orel
|
||||
SyNode for mORMot Copyright (C) 2022 Pavel Mashlyakovsky & Vadim Orel
|
||||
pavel.mash at gmail.com
|
||||
|
||||
Some ideas taken from
|
||||
@@ -141,8 +141,8 @@ type
|
||||
private
|
||||
fIndex: Integer;
|
||||
fIsPaused: boolean;
|
||||
fMessagesQueue: TRawUTF8ListLocked;
|
||||
fLogQueue: TRawUTF8ListLocked;
|
||||
fMessagesQueue: TRawUTF8List;
|
||||
fLogQueue: TRawUTF8List;
|
||||
{$IFNDEF SM52}
|
||||
fOldInterruptCallback: JSInterruptCallback;
|
||||
{$ENDIF}
|
||||
@@ -221,7 +221,7 @@ begin
|
||||
eng := fManager.EngineForThread(curThreadID);
|
||||
if eng<>nil then begin
|
||||
Debugger := eng.PrivateDataForDebugger;
|
||||
Debugger.fLogQueue.SafePush(Text);
|
||||
Debugger.fLogQueue.Add(Text);
|
||||
|
||||
if eng.cx.IsRunning then
|
||||
{$IFDEF SM52}
|
||||
@@ -522,7 +522,7 @@ begin
|
||||
|
||||
engine := fParent.fManager.EngineForThread(fDebugger.fSmThreadID);
|
||||
if (engine <> nil) then begin
|
||||
fDebugger.fMessagesQueue.SafePush(VariantToUTF8(request));
|
||||
fDebugger.fMessagesQueue.Add(VariantToUTF8(request));
|
||||
if not fDebugger.fIsPaused then begin
|
||||
if (not engine.cx.IsRunning) then begin
|
||||
if not Assigned(engine.doInteruptInOwnThread) then
|
||||
@@ -599,8 +599,8 @@ end;
|
||||
procedure TSMDebugger.attach(aThread: TSMRemoteDebuggerCommunicationThread);
|
||||
begin
|
||||
fCommunicationThread := aThread;
|
||||
fMessagesQueue.SafeClear;
|
||||
fLogQueue.SafeClear;
|
||||
fMessagesQueue.Clear;
|
||||
fLogQueue.Clear;
|
||||
end;
|
||||
|
||||
constructor TSMDebugger.Create(aParent: TSMRemoteDebuggerThread; aEng: TSMEngine);
|
||||
@@ -617,8 +617,8 @@ begin
|
||||
|
||||
fSmThreadID := GetCurrentThreadId;
|
||||
|
||||
fMessagesQueue := TRawUTF8ListLocked.Create();
|
||||
fLogQueue := TRawUTF8ListLocked.Create();
|
||||
fMessagesQueue := TRawUTF8List.Create();
|
||||
fLogQueue := TRawUTF8List.Create();
|
||||
fNameForDebug := aEng.nameForDebug;
|
||||
fDebuggerName := 'synode_debPort_' + aParent.fPort;
|
||||
fWebAppRootPath := aEng.webAppRootDir;
|
||||
@@ -680,8 +680,8 @@ var
|
||||
dbgObject: PJSRootedObject;
|
||||
res: Boolean;
|
||||
begin
|
||||
fMessagesQueue.SafeClear;
|
||||
fLogQueue.SafeClear;
|
||||
fMessagesQueue.Clear;
|
||||
fLogQueue.Clear;
|
||||
|
||||
cx := aEng.cx;
|
||||
cmpDbg := cx.EnterCompartment(aEng.GlobalObjectDbg.ptr);
|
||||
@@ -765,7 +765,7 @@ function debugger_read(cx: PJSContext; argc: uintN; var vp: JSArgRec): Boolean;
|
||||
var
|
||||
debugger: TSMDebugger;
|
||||
msg: RawUTF8;
|
||||
Queue: TRawUTF8ListLocked;
|
||||
Queue: TRawUTF8List;
|
||||
begin
|
||||
debugger := TSMEngine(cx.PrivateData).PrivateDataForDebugger;
|
||||
if (argc = 0) or vp.argv[0].asBoolean then
|
||||
@@ -774,7 +774,7 @@ begin
|
||||
Queue := debugger.fLogQueue;
|
||||
msg := '';
|
||||
while ((Queue <> nil) and (debugger.fCommunicationThread <> nil) and
|
||||
(not Queue.SafePop(msg))) and (argc = 0) do
|
||||
(not Queue.PopFirst(msg))) and (argc = 0) do
|
||||
SleepHiRes(10);
|
||||
result := true;
|
||||
if (Queue <> nil) and (debugger.fCommunicationThread <> nil) then
|
||||
|
@@ -5,10 +5,10 @@ unit SyNodeSimpleProto;
|
||||
{
|
||||
This file is part of Synopse framework.
|
||||
|
||||
Synopse framework. Copyright (C) 2020 Arnaud Bouchez
|
||||
Synopse framework. Copyright (C) 2022 Arnaud Bouchez
|
||||
Synopse Informatique - http://synopse.info
|
||||
|
||||
SyNode for mORMot Copyright (C) 2020 Pavel Mashlyakovsky & Vadim Orel
|
||||
SyNode for mORMot Copyright (C) 2022 Pavel Mashlyakovsky & Vadim Orel
|
||||
pavel.mash at gmail.com
|
||||
|
||||
Some ideas taken from
|
||||
@@ -180,7 +180,7 @@ begin
|
||||
PI.SetInt64Prop(Instance^.instance, val.asInt64);
|
||||
tkFloat:
|
||||
PI.SetFloatProp(Instance^.instance, val.asDouble);
|
||||
tkLString,{$IFDEF FPC}tkLStringOld{$ENDIF},tkWString{$ifdef HASVARUSTRING},tkUString{$endif}:
|
||||
tkLString{$IFDEF FPC},tkLStringOld{$ENDIF},tkWString{$ifdef HASVARUSTRING},tkUString{$endif}:
|
||||
PI.SetLongStrValue(Instance^.instance, val.asJsString.ToUTF8(cx));
|
||||
else
|
||||
raise ESMException.Create('NotImplemented');
|
||||
|
Reference in New Issue
Block a user