fix: crash on missing render frame (#31289)
This commit is contained in:
parent
014ebbd6fa
commit
9c8bd18c41
1 changed files with 3 additions and 0 deletions
|
@ -1706,6 +1706,9 @@ void WebContents::MessageTo(int32_t web_contents_id,
|
||||||
gin::Handle<WebFrameMain> web_frame_main =
|
gin::Handle<WebFrameMain> web_frame_main =
|
||||||
WebFrameMain::From(JavascriptEnvironment::GetIsolate(), frame);
|
WebFrameMain::From(JavascriptEnvironment::GetIsolate(), frame);
|
||||||
|
|
||||||
|
if (!web_frame_main->CheckRenderFrame())
|
||||||
|
return;
|
||||||
|
|
||||||
int32_t sender_id = ID();
|
int32_t sender_id = ID();
|
||||||
web_frame_main->GetRendererApi()->Message(false /* internal */, channel,
|
web_frame_main->GetRendererApi()->Message(false /* internal */, channel,
|
||||||
std::move(arguments), sender_id);
|
std::move(arguments), sender_id);
|
||||||
|
|
Loading…
Reference in a new issue