mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-24 08:02:15 +02:00
Fixed TChromium initialization. Now FBrowser is assigned only once.
This commit is contained in:
parent
6905f9a292
commit
2901108ba3
@ -2786,17 +2786,15 @@ end;
|
||||
|
||||
procedure TChromium.doOnAfterCreated(const browser: ICefBrowser);
|
||||
begin
|
||||
if (FBrowser = nil) and (browser <> nil) then
|
||||
if MultithreadApp and (FBrowser = nil) and (browser <> nil) then
|
||||
begin
|
||||
FBrowser := browser;
|
||||
FBrowserId := browser.Identifier;
|
||||
FBrowser := browser;
|
||||
FBrowserId := browser.Identifier;
|
||||
FInitialized := (FBrowserId <> 0);
|
||||
end;
|
||||
|
||||
doUpdatePreferences(browser);
|
||||
|
||||
if not(FInitialized) then
|
||||
FInitialized := (FBrowser <> nil) and (FBrowserId <> 0);
|
||||
|
||||
if Assigned(FOnAfterCreated) then FOnAfterCreated(Self, browser);
|
||||
end;
|
||||
|
||||
|
@ -2488,17 +2488,15 @@ end;
|
||||
|
||||
procedure TFMXChromium.doOnAfterCreated(const browser: ICefBrowser);
|
||||
begin
|
||||
if (FBrowser = nil) and (browser <> nil) then
|
||||
if MultithreadApp and (FBrowser = nil) and (browser <> nil) then
|
||||
begin
|
||||
FBrowser := browser;
|
||||
FBrowserId := browser.Identifier;
|
||||
FBrowser := browser;
|
||||
FBrowserId := browser.Identifier;
|
||||
FInitialized := (FBrowserId <> 0);
|
||||
end;
|
||||
|
||||
doUpdatePreferences(browser);
|
||||
|
||||
if not(FInitialized) then
|
||||
FInitialized := (FBrowser <> nil) and (FBrowserId <> 0);
|
||||
|
||||
if Assigned(FOnAfterCreated) then FOnAfterCreated(Self, browser);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user