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

Issue 1415743011: Call -browserWillBeDestroyed before releasing ToolbarController in unit tests. (Closed)

Created:
5 years, 1 month ago by dominickn
Modified:
5 years, 1 month ago
Reviewers:
Avi (use Gerrit)
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, Anand Mistry (off Chromium), perkj_chrome
Base URL:
https://chromium.googlesource.com/chromium/src.git@bookmark-apps-location-bar
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Call -browserWillBeDestroyed before releasing ToolbarController in unit tests. This addresses a use after free issue in LocationBarViewMac, caused because the browser object is freed and released before the ToolbarController in unit tests. This occurs despite an explicit release of the ToolbarController in the unit test TearDown as the NSViewController retains an additional reference that persists the ToolbarController (and hence LocationBarViewMac) beyond the browser object's lifetime. BUG=535321 Committed: https://crrev.com/7f6f0f9765d4f05a8d714077f9a3c3eef31f2d55 Cr-Commit-Position: refs/heads/master@{#357641}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -15 lines) Patch
M chrome/browser/ui/cocoa/toolbar/toolbar_controller_unittest.mm View 4 chunks +13 lines, -15 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 12 (7 generated)
dominickn
PTAL. This fixes the underlying use-after-free cause for the revet of a scoped_ptr change in ...
5 years, 1 month ago (2015-11-03 04:37:19 UTC) #5
Avi (use Gerrit)
lgtm
5 years, 1 month ago (2015-11-03 15:30:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1415743011/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1415743011/1
5 years, 1 month ago (2015-11-03 21:21:33 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 1 month ago (2015-11-03 21:47:27 UTC) #11
commit-bot: I haz the power
5 years, 1 month ago (2015-11-03 21:48:46 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/7f6f0f9765d4f05a8d714077f9a3c3eef31f2d55
Cr-Commit-Position: refs/heads/master@{#357641}

Powered by Google App Engine
This is Rietveld 408576698