Fix panic in embedded-opener-remove-frame (#33122)

Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
Taym Haddadi 2024-08-19 22:05:03 +02:00 committed by GitHub
parent 32a298f3a2
commit 91adf39de7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -713,7 +713,9 @@ impl WindowMethods for Window {
fn SetOpener(&self, cx: JSContext, value: HandleValue) -> ErrorResult {
// Step 1.
if value.is_null() {
self.window_proxy().disown();
if let Some(proxy) = self.window_proxy.get() {
proxy.disown();
}
return Ok(());
}
// Step 2.