mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix potential UAF of CefBPDNativeAura::window_widget_
This commit is contained in:
@@ -216,6 +216,12 @@ gfx::Vector2d CefBrowserPlatformDelegateNativeAura::GetUiWheelEventOffset(
|
||||
return gfx::Vector2d(deltaX, deltaY);
|
||||
}
|
||||
|
||||
base::OnceClosure
|
||||
CefBrowserPlatformDelegateNativeAura::GetWidgetDeleteCallback() {
|
||||
return base::BindOnce(&CefBrowserPlatformDelegateNativeAura::WidgetDeleted,
|
||||
weak_ptr_factory_.GetWeakPtr());
|
||||
}
|
||||
|
||||
// static
|
||||
base::TimeTicks CefBrowserPlatformDelegateNativeAura::GetEventTimeStamp() {
|
||||
return base::TimeTicks::Now();
|
||||
@@ -279,6 +285,11 @@ int CefBrowserPlatformDelegateNativeAura::TranslateUiChangedButtonFlags(
|
||||
return result;
|
||||
}
|
||||
|
||||
void CefBrowserPlatformDelegateNativeAura::WidgetDeleted() {
|
||||
DCHECK(window_widget_);
|
||||
window_widget_ = nullptr;
|
||||
}
|
||||
|
||||
content::RenderWidgetHostViewAura*
|
||||
CefBrowserPlatformDelegateNativeAura::GetHostView() const {
|
||||
if (!web_contents_) {
|
||||
|
Reference in New Issue
Block a user