fix: prevent menu gc during popup (#20745)
This commit is contained in:
parent
d0cdd12521
commit
fb8b1fd1c9
3 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,9 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
|||
int y,
|
||||
int positioning_item,
|
||||
base::Closure callback) {
|
||||
mate::Locker locker(isolate());
|
||||
v8::HandleScope handle_scope(isolate());
|
||||
|
||||
if (!native_window)
|
||||
return;
|
||||
NSWindow* nswindow = native_window->GetNativeWindow().GetNativeNSWindow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue