Index: ios/chrome/test/block_cleanup_test.mm |
diff --git a/ios/chrome/test/block_cleanup_test.mm b/ios/chrome/test/block_cleanup_test.mm |
index 06ac9e4c93c4b1aa91b096a1f2a90dcc3e365cb1..5b350578d02c3a0469c9defd4e6aba4a3f42acb6 100644 |
--- a/ios/chrome/test/block_cleanup_test.mm |
+++ b/ios/chrome/test/block_cleanup_test.mm |
@@ -8,6 +8,7 @@ |
#include "base/logging.h" |
#import "base/mac/scoped_nsobject.h" |
+#import "base/mac/foundation_util.h" |
void BlockCleanupTest::SetUp() { |
block_cleanup_pool_ = [[NSAutoreleasePool alloc] init]; |
@@ -22,7 +23,7 @@ void BlockCleanupTest::TearDown() { |
// Drain the autorelease pool to finish cleaning up after blocks. |
// TODO(rohitrao): Can this be an EXPECT, so as to not crash the whole suite? |
DCHECK(block_cleanup_pool_); |
- [block_cleanup_pool_ release]; |
+ [base::mac::ObjCCastStrict<NSAutoreleasePool>(block_cleanup_pool_) release]; |
block_cleanup_pool_ = nil; |
PlatformTest::TearDown(); |