summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-29 18:21:29 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-29 18:21:29 +0000
commit89d49f114cff9ecd0fabd6a108f3972fb0ab9027 (patch)
treed3c655ee3847b8d13f7f7b38c87c7fae2ff34c06
parent24641d7db8a175289c3c142e4740faf84f17f4ee (diff)
downloadchromium_src-89d49f114cff9ecd0fabd6a108f3972fb0ab9027.zip
chromium_src-89d49f114cff9ecd0fabd6a108f3972fb0ab9027.tar.gz
chromium_src-89d49f114cff9ecd0fabd6a108f3972fb0ab9027.tar.bz2
Mac: Try to fix a crash related to save panels.
All the stacks are always in the destructors. Wild guess: Maybe NSSavePanel takes the context object from the delegate instead of self. Pass in the delegate as described by the docs. BUG=58959 TEST=maybe fewer crashes on the crash server Review URL: http://codereview.chromium.org/6031008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70265 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/cocoa/shell_dialogs_mac.mm10
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/ui/cocoa/shell_dialogs_mac.mm b/chrome/browser/ui/cocoa/shell_dialogs_mac.mm
index 257bb62..92b2f58 100644
--- a/chrome/browser/ui/cocoa/shell_dialogs_mac.mm
+++ b/chrome/browser/ui/cocoa/shell_dialogs_mac.mm
@@ -36,7 +36,7 @@ class SelectFileDialogImpl;
- (id)initWithSelectFileDialogImpl:(SelectFileDialogImpl*)s;
- (void)endedPanel:(NSSavePanel*)panel
withReturn:(int)returnCode
- context:(void *)context;
+ context:(void*)context;
// NSSavePanel delegate method
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename;
@@ -126,7 +126,7 @@ SelectFileDialogImpl::~SelectFileDialogImpl() {
for (std::vector<NSSavePanel*>::iterator it = panels.begin();
it != panels.end(); ++it) {
- [(*it) cancel:nil];
+ [*it cancel:*it];
}
}
@@ -216,8 +216,8 @@ void SelectFileDialogImpl::SelectFile(
SheetContext* context = new SheetContext;
// |context| should never be NULL, but we are seeing indications otherwise.
- // |This CHECK is here to confirm if we are actually getting NULL
- // ||context|s. http://crbug.com/58959
+ // This CHECK is here to confirm if we are actually getting NULL
+ // |context|s. http://crbug.com/58959
CHECK(context);
context->type = type;
context->owning_window = owning_window;
@@ -361,7 +361,7 @@ bool SelectFileDialogImpl::ShouldEnableFilename(NSSavePanel* dialog,
- (void)endedPanel:(NSSavePanel*)panel
withReturn:(int)returnCode
- context:(void *)context {
+ context:(void*)context {
// |context| should never be NULL, but we are seeing indications otherwise.
// |This CHECK is here to confirm if we are actually getting NULL
// ||context|s. http://crbug.com/58959