Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Issue 1960023002: Destroy (Password)AutofillAgent safely (Closed)

Created:
4 years, 7 months ago by vabr (Chromium)
Modified:
4 years, 7 months ago
Reviewers:
dvadym
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2704
Target Ref:
refs/pending/branch-heads/2704
Project:
chromium
Visibility:
Public.

Description

Destroy (Password)AutofillAgent safely AutofillAgent and related code often edits field values. Those edits may trigger JavaScript capable of deleting the associated frame. Currently, AutofillAgent and related classes are RenderFrameObservers and delete themselves on the frame deletion. This results in use-after-free if the deletion happens up in the stack and there is still the method which changed the field value down on the stack. Therefore this CL postpones deletion by sending a DeleteSoon task on the frame destruction. The CL also changes a couple of places relying on render frame being alive if the observer is alive to handle a null frame gratefully. R=dvadym@chromium.org BUG=609010, 609007, 608100, 608101 Review-Url: https://codereview.chromium.org/1946143002 Cr-Commit-Position: refs/heads/master@{#391524} (cherry picked from commit d62bc3e6e2c3be6bbb01fa325e3389f089974017) Committed: https://chromium.googlesource.com/chromium/src/+/7e112c1563632f57cfa1c4fa964987f823da17fa

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -6 lines) Patch
M components/autofill/content/renderer/autofill_agent.h View 2 chunks +9 lines, -0 lines 0 comments Download
M components/autofill/content/renderer/autofill_agent.cc View 2 chunks +16 lines, -1 line 0 comments Download
M components/autofill/content/renderer/form_autofill_util.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M components/autofill/content/renderer/password_generation_agent.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/content/renderer/password_generation_agent.cc View 6 chunks +19 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
vabr (Chromium)
4 years, 7 months ago (2016-05-09 07:20:58 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
7e112c1563632f57cfa1c4fa964987f823da17fa.

Powered by Google App Engine
This is Rietveld 408576698