Changeset 170117 in webkit
- Timestamp:
- Jun 18, 2014 2:41:44 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSContext.mm
r166756 r170117 198 198 - (void)setName:(NSString *)name 199 199 { 200 JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[ name copy]) : nullptr;200 JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[[name copy] autorelease]) : nullptr; 201 201 JSGlobalContextSetName(m_context, nameJS); 202 202 if (nameJS) -
trunk/Source/JavaScriptCore/ChangeLog
r170109 r170117 1 2014-06-18 David Kilzer <ddkilzer@apple.com> 2 3 -[JSContext setName:] leaks NSString 4 <http://webkit.org/b/134038> 5 6 Reviewed by Joseph Pecoraro. 7 8 Fixes the following static analyzer warning: 9 10 JavaScriptCore/API/JSContext.mm:200:73: warning: Potential leak of an object 11 JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[name copy]) : nullptr; 12 ^ 13 14 * API/JSContext.mm: 15 (-[JSContext setName:]): Autorelease the copy of |name|. 16 1 17 2014-06-18 Mark Lam <mark.lam@apple.com> 2 18
Note: See TracChangeset
for help on using the changeset viewer.