зеркало из https://github.com/AvaloniaUI/angle.git
Fix end2end intermittent crash on macOS if custom OSWindow is used.
In MultisammpleTest, a custom OSWindow object is created. Sometimes this window's internal Objective-C window object is not released after the test finishes, thus input events such as mouse/keyboard are still forwarded to this window. However its content view is already released causing the crash. call [mWindow setContentView:nil] inside OSXWindow::destroy() seems to fix this bug. Bug: angleproject:4815 Change-Id: If00398ff0082624ade5e8be8ad3b0f91d17c23ed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2281782 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
b8583bcc95
Коммит
10ef43ce50
|
@ -685,6 +685,8 @@ void OSXWindow::destroy()
|
||||||
[mDelegate onOSXWindowDeleted];
|
[mDelegate onOSXWindowDeleted];
|
||||||
[mDelegate release];
|
[mDelegate release];
|
||||||
mDelegate = nil;
|
mDelegate = nil;
|
||||||
|
// NSWindow won't be completely released unless its content view is set to nil:
|
||||||
|
[mWindow setContentView:nil];
|
||||||
[mWindow release];
|
[mWindow release];
|
||||||
mWindow = nil;
|
mWindow = nil;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче