1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
6 #define IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
8 #import <Foundation/Foundation.h>
11 // Adds |impl_block| as a custom implementation for |allocWithZone:| method of
12 // |target| Class. AddAllocWithZoneMethod can not swizzle existing
13 // |allocWithZone:| method of |target| Class. Neither |target| nor any of its
14 // superclases must not have overridden |allocWithZone:|.
15 void AddAllocWithZoneMethod(Class target
, id (^impl_block
)(Class
, NSZone
*));
18 #endif // IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_