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

Side by Side Diff: src/client/ios/Breakpad.mm

Issue 1402453006: Only release current_breakpad_ if it is defined. (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, Google Inc. 1 // Copyright (c) 2011, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 return false; 256 return false;
257 257
258 return breakpad->HandleMinidump(dump_dir, minidump_id); 258 return breakpad->HandleMinidump(dump_dir, minidump_id);
259 } 259 }
260 260
261 //============================================================================= 261 //=============================================================================
262 void Breakpad::UncaughtExceptionHandler(NSException *exception) { 262 void Breakpad::UncaughtExceptionHandler(NSException *exception) {
263 NSSetUncaughtExceptionHandler(NULL); 263 NSSetUncaughtExceptionHandler(NULL);
264 if (current_breakpad_) { 264 if (current_breakpad_) {
265 current_breakpad_->HandleUncaughtException(exception); 265 current_breakpad_->HandleUncaughtException(exception);
266 BreakpadRelease(current_breakpad_);
266 } 267 }
267 BreakpadRelease(current_breakpad_);
268 } 268 }
269 269
270 //============================================================================= 270 //=============================================================================
271 #pragma mark - 271 #pragma mark -
272 272
273 //============================================================================= 273 //=============================================================================
274 bool Breakpad::Initialize(NSDictionary *parameters) { 274 bool Breakpad::Initialize(NSDictionary *parameters) {
275 // Initialize 275 // Initialize
276 current_breakpad_ = this; 276 current_breakpad_ = this;
277 config_params_ = NULL; 277 config_params_ = NULL;
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (breakpad) { 907 if (breakpad) {
908 return breakpad->GenerateReport(server_parameters); 908 return breakpad->GenerateReport(server_parameters);
909 } else { 909 } else {
910 return nil; 910 return nil;
911 } 911 }
912 } catch(...) { // don't let exceptions leave this C API 912 } catch(...) { // don't let exceptions leave this C API
913 fprintf(stderr, "BreakpadGenerateReport() : error\n"); 913 fprintf(stderr, "BreakpadGenerateReport() : error\n");
914 return nil; 914 return nil;
915 } 915 }
916 } 916 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698