mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Improve crash reporting of frame connection retry failures (see #3664)
Introduce different call stacks for different types of disconnects, and log additional state information in the FATAL message.
This commit is contained in:
@ -116,6 +116,13 @@ class CefFrameImpl
|
||||
// Called if the BrowserFrame connection attempt times out.
|
||||
void OnBrowserFrameTimeout();
|
||||
|
||||
// Called if the BrowserFrame connection is disconnected.
|
||||
void OnBrowserFrameDisconnect(uint32_t custom_reason,
|
||||
const std::string& description);
|
||||
// Called if the RenderFrame connection is disconnected.
|
||||
void OnRenderFrameDisconnect(uint32_t custom_reason,
|
||||
const std::string& description);
|
||||
|
||||
enum class DisconnectReason {
|
||||
DETACHED,
|
||||
BROWSER_FRAME_DETACHED,
|
||||
@ -127,7 +134,7 @@ class CefFrameImpl
|
||||
// Called if/when a disconnect occurs. This may occur due to frame navigation,
|
||||
// destruction, or insertion into the bfcache (when the browser-side frame
|
||||
// representation is destroyed and closes the connection).
|
||||
void OnDisconnect(DisconnectReason reason);
|
||||
void OnDisconnect(DisconnectReason reason, const std::string& description);
|
||||
|
||||
// Send an action to the remote BrowserFrame. This will queue the action if
|
||||
// the remote frame is not yet attached.
|
||||
@ -181,6 +188,11 @@ class CefFrameImpl
|
||||
RECONNECT_PENDING,
|
||||
} browser_connection_state_ = ConnectionState::DISCONNECTED;
|
||||
|
||||
static std::string GetDisconnectDebugString(ConnectionState connection_state,
|
||||
bool frame_is_valid,
|
||||
DisconnectReason reason,
|
||||
const std::string& description);
|
||||
|
||||
base::OneShotTimer browser_connect_timer_;
|
||||
|
||||
std::queue<std::pair<std::string, BrowserFrameAction>>
|
||||
|
Reference in New Issue
Block a user