fix: child window may have opener removed (#38910)
This commit is contained in:
parent
ff6d0df2d5
commit
09669f9d21
2 changed files with 18 additions and 1 deletions
|
@ -63,7 +63,7 @@ void ElectronRenderFrameObserver::DidClearWindowObject() {
|
|||
// Check DidInstallConditionalFeatures below for the background.
|
||||
auto* web_frame =
|
||||
static_cast<blink::WebLocalFrameImpl*>(render_frame_->GetWebFrame());
|
||||
if (has_delayed_node_initialization_ && web_frame->Opener() &&
|
||||
if (has_delayed_node_initialization_ &&
|
||||
!web_frame->IsOnInitialEmptyDocument()) {
|
||||
v8::Isolate* isolate = blink::MainThreadIsolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue