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

Unified Diff: ios/web/alloc_with_zone_interceptor.h

Issue 1043263003: Implemented AddAllocWithZoneMethod to override allocWithZone: on demand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolved Stuart's review comments Created 5 years, 8 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 | ios/web/alloc_with_zone_interceptor.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.h
diff --git a/ios/web/alloc_with_zone_interceptor.h b/ios/web/alloc_with_zone_interceptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..00265405d748091e0c3ec64f9f42109e1502bddf
--- /dev/null
+++ b/ios/web/alloc_with_zone_interceptor.h
@@ -0,0 +1,18 @@
+// 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.
+
+#ifndef IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
+#define IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
+
+#import <Foundation/Foundation.h>
+
+namespace web {
+// Adds |impl_block| as a custom implementation for |allocWithZone:| method of
+// |target| Class. AddAllocWithZoneMethod can not swizzle existing
+// |allocWithZone:| method of |target| Class. Neither |target| nor any of its
+// superclases must not have overridden |allocWithZone:|.
+void AddAllocWithZoneMethod(Class target, id (^impl_block)(Class, NSZone*));
+} // namespace web
+
+#endif // IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
« no previous file with comments | « no previous file | ios/web/alloc_with_zone_interceptor.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698