Reviewers: Mark Mentovai,
Description:
Updating BreakpadController to allow start and stop being nop.
When BreakpadController is already started or stopped, trying to
restart it or
restopping it will now be no-op instead of asserting.
Please review this at
https://breakpad.appspot.com/505002/
Affected files:
M src/client/ios/BreakpadController.mm
Index: src/client/ios/BreakpadController.mm
===================================================================
--- src/client/ios/BreakpadController.mm (revision 1091)
+++ src/client/ios/BreakpadController.mm (working copy)
@@ -136,7 +136,8 @@
BreakpadAddUploadParameter(breakpadRef_, @"platform",
GetPlatform());
}
};
- NSAssert(!started_, @"Start cannot be called more than once.");
+ if (started)
+ return;
started_ = YES;
if (onCurrentThread)
startBlock();
@@ -145,8 +146,8 @@
}
- (void)stop {
- NSAssert(started_,
- @"The controller must be started before it can be stopped");
+ if (!started)
+ return;
started_ = NO;
dispatch_sync(queue_, ^{
if (breakpadRef_) {