by michaeladamkatz » Mon Mar 19, 2018 2:31 am
atai, thanks for posting your solution to call CloseBrowser( true ).
I was not able to find a solution based on OnBeforeUnloadDialog(). I was getting this warning when quitting the program and calling CloseBrowser( false ). I was not able to see OnBeforeUnloadDialog() getting called during that sequence. Changing to CloseBrowser( true ) fixed the problem.
Also, strangely, I was only getting the warning sometimes. If I did certain things during a run, like clicking on certain parts of the screen, it would give the warning when I called CloseBrowser(). But if I didn't do those things, I wouldn't get the warning. So I don't know what criteria CEF was using to decide whether to show the message. I also couldn't find the text of the message anywhere in the source code, so I guess it must be buried in libcef.dll?
(Googling for the text of this message, it looks like others are having the same problem. For instance, some Steam users are complaining about seeing it.)