mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
Check embedder_message_dispatcher_ before sending a message
HandleMessageFromDevToolsFrontend() might be called after the WebContentsDestroyed() is.
This commit is contained in:
committed by
Samuel Attard
parent
6481161ef2
commit
622544a902
@@ -617,6 +617,11 @@ void InspectableWebContentsImpl::RegisterExtensionsAPI(
|
||||
|
||||
void InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend(
|
||||
const std::string& message) {
|
||||
// TODO(alexeykuzmin): Should we expect it to exist?
|
||||
if (!embedder_message_dispatcher_) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string method;
|
||||
base::ListValue empty_params;
|
||||
base::ListValue* params = &empty_params;
|
||||
|
||||
Reference in New Issue
Block a user