-[JSContext setName:] leaks NSString
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jun 2014 21:41:44 +0000 (21:41 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jun 2014 21:41:44 +0000 (21:41 +0000)
commit607024e00135ec0b898b766478897cc28ec304ca
treed9138fc0050bb7b91882e02669a5957c2b71b2ec
parent02b8750bfe8a8abba6fe78f7a2541592851e0352
-[JSContext setName:] leaks NSString
<http://webkit.org/b/134038>

Reviewed by Joseph Pecoraro.

Fixes the following static analyzer warning:

    JavaScriptCore/API/JSContext.mm:200:73: warning: Potential leak of an object
        JSStringRef nameJS = name ? JSStringCreateWithCFString((CFStringRef)[name copy]) : nullptr;
                                                                            ^

* API/JSContext.mm:
(-[JSContext setName:]): Autorelease the copy of |name|.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/API/JSContext.mm
Source/JavaScriptCore/ChangeLog