mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
Merge pull request #2461 from atom/fix-webview-crash
Delay the call of element resize callback to next tick
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <map>
|
||||
|
||||
#include "base/lazy_instance.h"
|
||||
#include "ui/gfx/geometry/size.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
@@ -51,7 +52,9 @@ void GuestViewContainer::DidResizeElement(const gfx::Size& old_size,
|
||||
if (element_resize_callback_.is_null())
|
||||
return;
|
||||
|
||||
element_resize_callback_.Run(old_size, new_size);
|
||||
base::MessageLoop::current()->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(element_resize_callback_, old_size, new_size));
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
||||
Reference in New Issue
Block a user