forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix use-after-free bug if beginBackgroundTaskWithExpirationHandler re…
…turns UIBackgroundTaskInvalid In this case UIApplication doesn't retain block, and at the end of constructor ref_count of |this| will be decremented to zero -> |this| will be deleted. Later deleted object will be accessed in |core_(new ScopedCriticalAction::Core())| The solution is to separate object construction and beginBackgroundTaskWithExpirationHandler method call. Change-Id: I0aa21cba2396231ea9ccd3ee34617f5d0417dbdd Reviewed-on: https://chromium-review.googlesource.com/558245 Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#485582}
- Loading branch information
Showing
2 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters