Bug 73627 - [Mac] Reference count threading violation in FormDataStreamMac.mm
Summary: [Mac] Reference count threading violation in FormDataStreamMac.mm
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-01 23:01 PST by Darin Adler
Modified: 2011-12-02 09:43 PST (History)
1 user (show)

See Also:


Attachments
Patch (7.20 KB, patch)
2011-12-01 23:08 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (7.19 KB, patch)
2011-12-01 23:12 PST, Darin Adler
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2011-12-01 23:01:23 PST
[Mac] Reference count threading violation in FormDataStreamMac.mm
Comment 1 Darin Adler 2011-12-01 23:08:05 PST
Created attachment 117575 [details]
Patch
Comment 2 mitz 2011-12-01 23:11:27 PST
Comment on attachment 117575 [details]
Patch

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

> Source/WebCore/platform/network/mac/FormDataStreamMac.mm:62
> +    DEFINE_STATIC_LOCAL(NSMapTable *, streamFieldsMap, (NSCreateMapTable(NSNonRetainedObjectMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 1)));

I don’t think DEFINE_STATIC_LOCAL makes sense for a pointer type. Those don’t have destructors.
Comment 3 Darin Adler 2011-12-01 23:11:50 PST
Comment on attachment 117575 [details]
Patch

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

>> Source/WebCore/platform/network/mac/FormDataStreamMac.mm:62
>> +    DEFINE_STATIC_LOCAL(NSMapTable *, streamFieldsMap, (NSCreateMapTable(NSNonRetainedObjectMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 1)));
> 
> I don’t think DEFINE_STATIC_LOCAL makes sense for a pointer type. Those don’t have destructors.

You're right. I should just use a plain old "static" here.
Comment 4 Darin Adler 2011-12-01 23:12:44 PST
Created attachment 117576 [details]
Patch
Comment 5 Darin Adler 2011-12-02 09:43:00 PST
Committed r101813: <http://trac.webkit.org/changeset/101813>