fix: crash on missing render frame (#31333)

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2021-10-11 09:34:32 +09:00
committed by GitHub
parent 042f00d25a
commit 25159f3ee1

View File

@@ -1689,6 +1689,9 @@ void WebContents::MessageTo(int32_t web_contents_id,
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(false /* internal */, channel,
std::move(arguments), sender_id);