<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>10834</bug_id>
          
          <creation_ts>2006-09-13 05:56:09 -0700</creation_ts>
          <short_desc>FileChooser constructor in FileChooserMac appears to overretain m_controller</short_desc>
          <delta_ts>2006-09-13 21:57:09 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>EasyFix</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Rowe (bdash)">mrowe</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aroben</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55387</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2006-09-13 05:56:09 -0700</bug_when>
    <thetext>m_controller&apos;s initializer (http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/platform/mac/FileChooserMac.mm?rev=16323#L92) reads:

    , m_controller([[[OpenPanelController alloc] initWithFileChooser:this] retain])

Allocing and then retaining the OpenPanelController seems incorrect to me.  If this is intended, it should have some form of explanatory comment as it&apos;s not standard practice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55389</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2006-09-13 06:10:43 -0700</bug_when>
    <thetext>After trawling through some of Buildbot&apos;s leak output, I noticed:

	Call stack: [thread 252f87]: | 0x0 | start | _start | main | runTest | -[NSRunLoop runMode:beforeDate:] | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoSources0 | _sendCallbacks | -[NSURLConnection(NSURLConnectionInternal) _sendCallbacks] | -[NSURLConnection(NSURLConnectionInternal) _sendDidFinishLoadingCallback] | -[WebLoader connectionDidFinishLoading:] | -[WebSubresourceLoader didFinishLoading] | -[WebCoreResourceLoaderImp finishWithData:] | -[WebCoreResourceLoaderImp finishJobAndHandle:] | WebCore::Loader::receivedAllData(WebCore::ResourceLoader*, NSData*) | WebCore::CachedScript::data(WTF::Vector&lt;char, (unsigned long)0&gt;&amp;, bool) | WebCore::CachedScript::checkNotify() | WebCore::HTMLTokenizer::notifyFinished(WebCore::CachedResource*) | WebCore::HTMLTokenizer::write(WebCore::SegmentedString const&amp;, bool) | WebCore::HTMLTokenizer::parseTag(WebCore::SegmentedString&amp;, WebCore::HTMLTokenizer::State) | WebCore::HTMLTokenizer::processToken() | WebCore::HTMLParser::parseToken(WebCore::Token*) | WebCore::HTMLParser::insertNode(WebCore::Node*, bool) | WebCore::HTMLInputElement::attach() | WebCore::HTMLGenericFormElement::attach() | WebCore::Element::attach() | WebCore::Node::createRendererIfNeeded() | WebCore::HTMLInputElement::createRenderer(WebCore::RenderArena*, WebCore::RenderStyle*) | WebCore::RenderFileUploadControl::RenderFileUploadControl[in-charge](WebCore::Node*) | WebCore::FileChooser::FileChooser[in-charge](WebCore::Document*, WebCore::RenderFileUploadControl*) | NSAllocateObject | _internal_class_createInstanceFromZone 
Leak: 0x1d406050  size=16	instance of &apos;OpenPanelController&apos;	
(http://build.webkit.org/results/post-commit-leaks-powerpc-mac-os-x/2531/DumpRenderTree-leaks.txt)

This seems to confirm that it is being overretained.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55457</commentid>
    <comment_count>2</comment_count>
      <attachid>10550</attachid>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2006-09-13 15:50:09 -0700</bug_when>
    <thetext>Created attachment 10550
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55459</commentid>
    <comment_count>3</comment_count>
      <attachid>10550</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2006-09-13 15:56:39 -0700</bug_when>
    <thetext>Comment on attachment 10550
Patch

r=me. Thanks for catching this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55475</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2006-09-13 21:57:09 -0700</bug_when>
    <thetext>Landed in r16358.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>10550</attachid>
            <date>2006-09-13 15:50:09 -0700</date>
            <delta_ts>2006-09-13 15:56:39 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>webkit-bug-10834-patch-v1.patch</filename>
            <type>text/plain</type>
            <size>1237</size>
            <attacher name="Mark Rowe (bdash)">mrowe</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAxNjM0OSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTMgQEAKKzIwMDYtMDktMTQgIE1hcmsgUm93ZSAgPG9wZW5kYXJ3aW4ub3JnQGJk
YXNoLm5ldC5uej4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAg
ICAgICBodHRwOi8vYnVnemlsbGEub3BlbmRhcndpbi5vcmcvc2hvd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HJldGFpbl0pCisgICAgLCBtX2NvbnRyb2xsZXIoW1tPcGVuUGFuZWxDb250cm9sbGVyIGFs
bG9jXSBpbml0V2l0aEZpbGVDaG9vc2VyOnRoaXNdKQogewogfQogCg==
</data>
<flag name="review"
          id="3416"
          type_id="1"
          status="+"
          setter="aroben"
    />
          </attachment>
      

    </bug>

</bugzilla>