Commit d230fb11 authored by mukai@chromium.org's avatar mukai@chromium.org

Ensure calling Close and set_listener(NULL) on End().

WebContentsImpl's dtor calls End() but it may not cause
set_listener(NULL) in some case, which may cause a use-after-free.

This CL always reset them at End(). This would mean
DidEndColorChooser() may be called twice, so web_contents_
has to be reset to NULL once DidEndColorChooser() is called.

BUG=338464
R=keishi@chromium.org

Review URL: https://codereview.chromium.org/148223009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247917 0039d316-1c4b-4281-b951-d872f2087c98
parent eeedaa69
......@@ -35,7 +35,7 @@ void ColorChooserAura::OnColorChooserDialogClosed() {
}
void ColorChooserAura::End() {
if (widget_ && widget_->IsVisible()) {
if (widget_) {
view_->set_listener(NULL);
widget_->Close();
view_ = NULL;
......
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