I've run into situations (typically when loading long web pages) where HandleLoadEnd is being called after HandleBeforeWindowClose. The situation usually looks like this:
1. Load a long-ish web page (maybe NYT front page or Google News or something like that).
2. Close the browser before it finishes loading.
3. HandleBeforeWindowClose triggers.
4. HandleLoadEnd triggers.
In my particular application, I end up crashing in HandleLoadEnd (step 4), because I'm trying to dereference a cached browser pointer that was set to NULL by HandleBeforeWindowClose. Obviously, I can guard against dereferencing the NULL pointer, but I'm wondering if this sequence of events is intended. It seems to me that when HandleBeforeWindowClose triggers, I shouldn't receive any additional events from CEF after that point, since that's occuring post-WM_DESTROY.
Please correct me if I'm mistaken in any of this! If this is indeed a bug, I'd be happy to open a new case; I just wanted to run it by everyone here first.
Thanks,
Emerick