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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm

Issue 14130008: Fix race condition if a pulsing bookmark button is deleted while the bookmark bubble controller is … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: less crash Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm
index b19a3ca76107a23bcaa02f0e232efd898863a986..02bc4c97e1ed4c405d0024de21ba4d727862d81b 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm
@@ -80,9 +80,11 @@
- (void)runAsModalSheet {
// Ping me when things change out from under us.
observer_.reset(new BookmarkModelObserverForCocoa(
- node_, BookmarkModelFactory::GetForProfile(profile_),
- self,
- @selector(cancel:)));
+ BookmarkModelFactory::GetForProfile(profile_),
+ ^(BOOL nodeWasDeleted) {
+ [self cancel:nil];
+ }));
+ observer_->StartObservingNode(node_);
[NSApp beginSheet:[self window]
modalForWindow:parentWindow_
modalDelegate:self
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698