Changeset 171240 in webkit
- Timestamp:
- Jul 18, 2014 1:50:11 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r171239 r171240 1 2014-07-18 Joseph Pecoraro <pecoraro@apple.com> 2 3 [Cocoa] Use RetainPtr in _WKRemoteObjectInterface 4 https://bugs.webkit.org/show_bug.cgi?id=135062 5 6 Reviewed by Anders Carlsson. 7 8 Switch to RetainPtr instead of manual memory management of ivars. 9 10 * Shared/API/Cocoa/_WKRemoteObjectInterface.h: 11 * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: 12 (-[_WKRemoteObjectInterface initWithProtocol:identifier:]): 13 (-[_WKRemoteObjectInterface identifier]): 14 (-[_WKRemoteObjectInterface description]): 15 (-[_WKRemoteObjectInterface dealloc]): Deleted. 16 1 17 2014-07-18 Tim Horton <timothy_horton@apple.com> 2 18 -
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.h
r168566 r171240 37 37 - (id)initWithProtocol:(Protocol *)protocol identifier:(NSString *)identifier; 38 38 39 @property (readonly ) Protocol *protocol;40 @property (readonly ) NSString *identifier;39 @property (readonly, nonatomic) Protocol *protocol; 40 @property (readonly, nonatomic) NSString *identifier; 41 41 42 42 - (NSSet *)classesForSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex; -
trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm
r171098 r171240 43 43 @implementation _WKRemoteObjectInterface { 44 44 HashMap<SEL, Vector<RetainPtr<NSSet>>> _allowedArgumentClasses; 45 RetainPtr<NSString> _identifier; 45 46 } 46 47 … … 130 131 131 132 _protocol = protocol; 132 _identifier = [identifier copy];133 _identifier = adoptNS([identifier copy]); 133 134 134 135 initializeAllowedArgumentClasses(self); … … 142 143 } 143 144 144 - (void)dealloc 145 { 146 [_identifier release]; 147 [super dealloc]; 145 - (NSString *)identifier 146 { 147 return _identifier.get(); 148 148 } 149 149 150 150 - (NSString *)description 151 151 { 152 return [NSString stringWithFormat:@"<%@: %p; protocol = \"%@\"; identifier = \"%@\">", NSStringFromClass(self.class), self, _identifier , NSStringFromProtocol(_protocol)];152 return [NSString stringWithFormat:@"<%@: %p; protocol = \"%@\"; identifier = \"%@\">", NSStringFromClass(self.class), self, _identifier.get(), NSStringFromProtocol(_protocol)]; 153 153 } 154 154
Note: See TracChangeset
for help on using the changeset viewer.