mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: crash on missing render frame (#31335)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -1679,6 +1679,9 @@ void WebContents::MessageTo(bool internal,
|
||||
gin::Handle<WebFrameMain> web_frame_main =
|
||||
WebFrameMain::From(JavascriptEnvironment::GetIsolate(), frame);
|
||||
|
||||
if (!web_frame_main->CheckRenderFrame())
|
||||
return;
|
||||
|
||||
int32_t sender_id = ID();
|
||||
web_frame_main->GetRendererApi()->Message(internal, channel,
|
||||
std::move(arguments), sender_id);
|
||||
|
||||
Reference in New Issue
Block a user