diff --git a/source/uCEFApplicationCore.pas b/source/uCEFApplicationCore.pas index baa80149..591c2630 100644 --- a/source/uCEFApplicationCore.pas +++ b/source/uCEFApplicationCore.pas @@ -780,14 +780,18 @@ begin FMustFreeLibrary := False; FLastErrorMessage := ''; {$IFDEF MSWINDOWS} - if (FProcessType = ptBrowser) then - GetDLLVersion(ChromeElfPath, FChromeVersionInfo) - else - // Subprocesses will be the last to be notified about the Windows shutdown. - // The main browser process will receive WM_QUERYENDSESSION before the subprocesses - // and that allows to close the application in the right order. - // See the MiniBrowser demo for all the details. - SetProcessShutdownParameters(CHROMIUM_NONBROWSERSHUTDOWNPRIORITY - 1, SHUTDOWN_NORETRY); + case FProcessType of + ptBrowser : GetDLLVersion(ChromeElfPath, FChromeVersionInfo); + ptCrashpad : + // The crashpad handler process must be the last one to be closed + SetProcessShutdownParameters($100, SHUTDOWN_NORETRY); + else + // Subprocesses will be the last to be notified about the Windows shutdown. + // The main browser process will receive WM_QUERYENDSESSION before the subprocesses + // and that allows to close the application in the right order. + // See the MiniBrowser demo for all the details. + SetProcessShutdownParameters(CHROMIUM_NONBROWSERSHUTDOWNPRIORITY - 1, SHUTDOWN_NORETRY); + end; {$ENDIF} // Internal filelds @@ -1598,7 +1602,10 @@ begin if (CompareText(TempValue, 'broker') = 0) then Result := ptBroker else - Result := ptOther; + if (CompareText(TempValue, 'crashpad-handler') = 0) then + Result := ptCrashpad + else + Result := ptOther; end else Result := ptBrowser; diff --git a/source/uCEFTypes.pas b/source/uCEFTypes.pas index 5b2ba3ae..ea6125a9 100644 --- a/source/uCEFTypes.pas +++ b/source/uCEFTypes.pas @@ -448,7 +448,7 @@ type // in the main thread before closing the browser. TCefCloseBrowserAction = (cbaClose, cbaDelay, cbaCancel); - TCefProcessType = (ptBrowser, ptRenderer, ptZygote, ptGPU, ptUtility, ptBroker, ptOther); + TCefProcessType = (ptBrowser, ptRenderer, ptZygote, ptGPU, ptUtility, ptBroker, ptCrashpad, ptOther); // Used in TChromium preferences to allow or block cookies. TCefCookiePref = (cpDefault, cpAllow, cpBlock); diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index b6dbb002..c0b73a82 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 340, + "InternalVersion" : 341, "Name" : "cef4delphi_lazarus.lpk", "Version" : "96.0.17.0" }