blob: 00265405d748091e0c3ec64f9f42109e1502bddf [file] [log] [blame]
eugenebut064f5bf2015-04-14 18:35:051// 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.
4
5#ifndef IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
6#define IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_
7
8#import <Foundation/Foundation.h>
9
10namespace web {
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:|.
15void AddAllocWithZoneMethod(Class target, id (^impl_block)(Class, NSZone*));
16} // namespace web
17
18#endif // IOS_WEB_ALLOC_WITH_ZONE_INTERCEPTOR_H_