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

Unified Diff: ios/web/alloc_with_zone_interceptor.mm

Issue 2577353003: [ios] Removed alloc_with_zone_interceptor as unused. (Closed)
Patch Set: Created 4 years 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 | « ios/web/alloc_with_zone_interceptor.h ('k') | ios/web/alloc_with_zone_interceptor_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/alloc_with_zone_interceptor.mm
diff --git a/ios/web/alloc_with_zone_interceptor.mm b/ios/web/alloc_with_zone_interceptor.mm
deleted file mode 100644
index a3ee56708f469deb3ae0dd238aa8b018df6b1bc2..0000000000000000000000000000000000000000
--- a/ios/web/alloc_with_zone_interceptor.mm
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "ios/web/alloc_with_zone_interceptor.h"
-
-#import <objc/runtime.h>
-
-#include "base/logging.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-namespace web {
-
-void AddAllocWithZoneMethod(Class target, id (^impl_block)(Class, NSZone*)) {
- // Make sure |allocWithZone:| is not already implemented in the target class.
- Class meta_class = object_getClass(target);
- DCHECK_EQ(
- class_getMethodImplementation(meta_class, @selector(allocWithZone:)),
- class_getMethodImplementation(object_getClass([NSObject class]),
- @selector(allocWithZone:)));
-
- IMP new_impl = imp_implementationWithBlock(^(id self, NSZone* zone) {
- return impl_block(self, zone);
- });
- class_addMethod(meta_class, @selector(allocWithZone:), new_impl, "v@:@");
-}
-
-} // namespace web
« no previous file with comments | « ios/web/alloc_with_zone_interceptor.h ('k') | ios/web/alloc_with_zone_interceptor_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698