fix: crash on missing render frame (#31335)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2021-10-11 09:34:13 +09:00
committed by GitHub
parent 1caf4e695d
commit f0b37841ea

View File

@@ -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);