summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/cocoa/throbber_view.mm9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/throbber_view.mm b/chrome/browser/cocoa/throbber_view.mm
index b6b48c3..b8a517e 100644
--- a/chrome/browser/cocoa/throbber_view.mm
+++ b/chrome/browser/cocoa/throbber_view.mm
@@ -50,7 +50,6 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
DCHECK(numFrames_);
image_.reset([image retain]);
-#if 0
// Start a timer for the animation frames.
target_.reset([[TimerTarget alloc] initWithThrobber:self]);
timer_ =
@@ -59,7 +58,6 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
selector:@selector(animate:)
userInfo:nil
repeats:YES];
-#endif
}
return self;
}
@@ -69,6 +67,13 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
[super dealloc];
}
+- (void)removeFromSuperview {
+ [timer_ invalidate];
+ timer_ = nil;
+
+ [super removeFromSuperview];
+}
+
// Called when the TimerTarget gets tickled by our timer. Increment the frame
// counter and mark as needing display.
- (void)animate {