| Index: ios/shared/chrome/browser/ui/commands/command_dispatcher.mm
|
| diff --git a/ios/shared/chrome/browser/ui/commands/command_dispatcher.mm b/ios/shared/chrome/browser/ui/commands/command_dispatcher.mm
|
| index 4829b3be6edab567d6bf400b4d5cd674c981149c..a3c12f8e54835ddbcb1a41b0c2e503e6d0772809 100644
|
| --- a/ios/shared/chrome/browser/ui/commands/command_dispatcher.mm
|
| +++ b/ios/shared/chrome/browser/ui/commands/command_dispatcher.mm
|
| @@ -25,6 +25,10 @@
|
| _forwardingTargets[selector] = target;
|
| }
|
|
|
| +- (void)stopDispatchingForSelector:(SEL)selector {
|
| + _forwardingTargets.erase(selector);
|
| +}
|
| +
|
| // |-stopDispatchingToTarget| should be called much less often than
|
| // |-forwardingTargetForSelector|, so removal is intentionally O(n) in order
|
| // to prioritize the speed of lookups.
|
| @@ -37,7 +41,7 @@
|
| }
|
|
|
| for (auto* selector : selectorsToErase) {
|
| - _forwardingTargets.erase(selector);
|
| + [self stopDispatchingForSelector:selector];
|
| }
|
| }
|
|
|
|
|