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

Unified Diff: testing/platform_test.h

Issue 2121893003: Declare pool_ as id instead of NSAutoreleasePool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/platform_test.h
diff --git a/testing/platform_test.h b/testing/platform_test.h
index 04fc845bd99bb1f19421834ee0ca6371eee37ef3..24980fbe0c160a72712b080df243fdf442c77a15 100644
--- a/testing/platform_test.h
+++ b/testing/platform_test.h
@@ -8,10 +8,8 @@
#include <gtest/gtest.h>
#if defined(GTEST_OS_MAC)
-#ifdef __OBJC__
-@class NSAutoreleasePool;
-#else
-class NSAutoreleasePool;
+#ifndef __OBJC__
+typedef void* id;
#endif
// The purpose of this class us to provide a hook for platform-specific
@@ -27,7 +25,10 @@ class PlatformTest : public testing::Test {
PlatformTest();
private:
- NSAutoreleasePool* pool_;
+ // |pool_| is a NSAutoreleasePool, but since this header may be imported from
+ // files built with Objective-C ARC that forbids explicit usage of
+ // NSAutoreleasePools, it is declared as id here.
+ id pool_;
};
#else
typedef testing::Test PlatformTest;
« 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