chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.32k stars 465 forks source link

GetRenderHandler() appears after OnBeforeClose happened in OSR + external_message_pump mode. #3022

Open magreenblatt opened 4 years ago

magreenblatt commented 4 years ago

Original report by Sergey Petrovskiy (Bitbucket: codelimit, GitHub: codelimit).


1、What version of the product are you using? On what operating system?

cef: 85.3.12 chromium: 85.0.4183.121, Win10 v1903

cmake 3.17, Visual Studio 16.7

2、What is the expected output? What do you see instead?

I expected there should be no handler callbacks after OnBeforeClose(). Instead I see GetRenderHandler() callback happens.

3、What steps will reproduce the problem?

  1. Download cefclient src from cef_binary_85.3.12+g3e94ebf+chromium-85.0.4183.121_windows32.tar.bz2 , unpack and build cefclient project.
  2. Launch cefclient debug session with --off-screen-rendering-enabled ---external-message-pump args.
  3. Goto https://en.wikipedia.org/w/index.php?title=Special:UserLogin&returnto=Login in browser window
  4. Set a breakpoint at ClientHandlerOsr::OnBeforeClose (Line: 38 File: client_handler_osr.cc)
  5. Close cefclient window Alt+F4
  6. p4 breakpoint will hit.
  7. At this time set a breakpoint at ClientHandlerOsr::GetRenderHandler() (Line: 86 File: client_handler_osr.h) and press continue debugging.
  8. p7 breakpoint will hit.

Forum’s post
https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=17886

magreenblatt commented 4 years ago

Original changes by Sergey Petrovskiy (Bitbucket: codelimit, GitHub: codelimit).