Bug 140889

Summary: Plug leak in jsValueWithDictionaryInContext().
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore JavaScriptAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andreas Kling 2015-01-26 11:03:51 PST
There's a JSStringRef leak below jsValueWithDictionaryInContext() according to leaks bot. Let's plug it.
Comment 1 Andreas Kling 2015-01-26 11:04:31 PST
Created attachment 245356 [details]
Patch
Comment 2 David Kilzer (:ddkilzer) 2015-01-26 11:36:44 PST
Comment on attachment 245356 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=245356&action=review

> Source/WebCore/platform/mac/SerializedPlatformRepresentationMac.mm:199
>          JSStringRef name = JSStringCreateWithCFString((CFStringRef)key);
>          JSObjectSetProperty([context JSGlobalContextRef], resultObject, name, [value JSValueRef], 0, &exception);
> +        JSStringRelease(name);

Can we annotate JSStringCreateWithCFString() and JSStringRelease() so the clang static analyzer will find these leaks for us?
Comment 3 WebKit Commit Bot 2015-01-26 12:57:38 PST
Comment on attachment 245356 [details]
Patch

Clearing flags on attachment: 245356

Committed r179137: <http://trac.webkit.org/changeset/179137>
Comment 4 WebKit Commit Bot 2015-01-26 12:57:42 PST
All reviewed patches have been landed.  Closing bug.