Commit 5a47d400 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

DragController: Clear DragState in DragEnd

DragState is a ScriptWrappable which can keep alive JavaScript upon
unified heap garbage collection resulting in a leak of the last Window
that used a drag event. Clear the state when the drag ended.

Bug: 843903, 928781
Change-Id: Id86a1a917fe772f56fb679e1d73ef3453785ce6d
Reviewed-on: https://chromium-review.googlesource.com/c/1456073Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629582}
parent 196e39c9
...@@ -215,6 +215,7 @@ void DragController::ClearDragCaret() { ...@@ -215,6 +215,7 @@ void DragController::ClearDragCaret() {
void DragController::DragEnded() { void DragController::DragEnded() {
drag_initiator_ = nullptr; drag_initiator_ = nullptr;
did_initiate_drag_ = false; did_initiate_drag_ = false;
drag_state_ = nullptr;
page_->GetDragCaret().Clear(); page_->GetDragCaret().Clear();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment