Chromium Code Reviews
DescriptionFix use-after-free in WidgetCaptureTest.SetCaptureToNonToplevel.
This test case calls AddObserver with a pointer to a local variable.
The observer is then called during the test instance destruction,
when the local variable is already out of scope.
The fix is to call RemoveObserver while the observer variable is
still alive.
The bug was found by AddressSanitizer with use-after-scope check enabled.
BUG=649897
Committed: https://crrev.com/f51080b57ed7b3570a7a890b6ad5ef4ddf49747e
Cr-Commit-Position: refs/heads/master@{#440001}
Patch Set 1 #
Messages
Total messages: 14 (9 generated)
|
|||||||||||||||||||