1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

OutputDebugMessage moved to uCEFMiscFunctions, New TCEFApplication.AddCommandLine procedure and TCEFApplication.CheckCEFLibrary enhancements

This commit is contained in:
Salvador Diaz Fau
2017-02-13 10:24:44 +01:00
parent 8aafbee064
commit 9b4bb2a27c
10 changed files with 336 additions and 253 deletions

View File

@@ -495,18 +495,25 @@ end;
destructor TVCLClientHandler.Destroy;
begin
if not(MultithreadApp) and not(ExternalMessagePump) then
begin
InterlockedDecrement(CefInstances);
if (CefInstances = 0) and (CefTimer <> 0) then
try
try
if not(MultithreadApp) and not(ExternalMessagePump) then
begin
KillTimer(0, CefTimer);
CefTimer := 0;
end;
end;
InterlockedDecrement(CefInstances);
inherited Destroy;
if (CefInstances = 0) and (CefTimer <> 0) then
begin
KillTimer(0, CefTimer);
CefTimer := 0;
end;
end;
except
on e : exception do
OutputDebugMessage('TVCLClientHandler.Destroy error: ' + e.Message);
end;
finally
inherited Destroy;
end;
end;
procedure TVCLClientHandler.ReleaseOtherInstances;
@@ -530,8 +537,7 @@ begin
if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.MultiThreadedMessageLoop;
except
on e : exception do
if (GlobalCEFApp <> nil) then
GlobalCEFApp.OutputDebugMessage('TVCLClientHandler.GetMultithreadApp error: ' + e.Message);
OutputDebugMessage('TVCLClientHandler.GetMultithreadApp error: ' + e.Message);
end;
end;
@@ -543,8 +549,7 @@ begin
if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.ExternalMessagePump;
except
on e : exception do
if (GlobalCEFApp <> nil) then
GlobalCEFApp.OutputDebugMessage('TVCLClientHandler.GetExternalMessagePump error: ' + e.Message);
OutputDebugMessage('TVCLClientHandler.GetExternalMessagePump error: ' + e.Message);
end;
end;