<?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>66548</bug_id>
          
          <creation_ts>2011-08-19 05:50:02 -0700</creation_ts>
          <short_desc>check-webkit-style should allow out RefPtr parameters</short_desc>
          <delta_ts>2011-10-04 19:26:27 -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>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>67797</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pavel Feldman">pfeldman</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>darin</cc>
    
    <cc>eric</cc>
    
    <cc>levin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>453765</commentid>
    <comment_count>0</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-08-19 05:50:02 -0700</bug_when>
    <thetext>Source/WebCore/inspector/InspectorDOMAgent.h:131:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453894</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-08-19 10:10:47 -0700</bug_when>
    <thetext>http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/InspectorDOMAgent.h#L131</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453895</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-08-19 10:10:55 -0700</bug_when>
    <thetext>    void getAttributes(ErrorString*, int nodeId, RefPtr&lt;InspectorArray&gt;* result);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453897</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-08-19 10:12:30 -0700</bug_when>
    <thetext>I think other parts of the code would write that as a reference instead of a pointer.  Or they&apos;d return a PassRefPtr from the method itself.

Also, &quot;get&quot; is not normally used in method names, except where dictated by the DOM api.

I&apos;m not sure if there is a bug here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453906</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-08-19 10:21:01 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; I think other parts of the code would write that as a reference instead of a pointer. Or they&apos;d return a PassRefPtr from the method itself.

Yes.

&gt; Also, &quot;get&quot; is not normally used in method names, except where dictated by the DOM api.

I disagree; get is correctly used here to indicate a function that uses an out argument rather than a function result.

But as Eric says, in this case there is no obvious reason for use of an out argument for a single function result. Returning a PassRefPtr is the idiom for this sort of thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>477889</commentid>
    <comment_count>5</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-10-04 13:40:43 -0700</bug_when>
    <thetext>&gt; But as Eric says, in this case there is no obvious reason for use of an out argument for a single function result. Returning a PassRefPtr is the idiom for this sort of thing.

This is a part of the inspector protocol, methods on the agents are called from the generated dispatcher. Generator was treating RefPtr as the rest of the types, using raw pointers for all out parameters. We&apos;ll change it to:

void getAttributes(ErrorString*, int nodeId, RefPtr&amp;&lt;InspectorArray&gt; result);

to address this warning under https://bugs.webkit.org/show_bug.cgi?id=69366.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>478117</commentid>
    <comment_count>6</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2011-10-04 19:26:27 -0700</bug_when>
    <thetext>I missed this when I fixed it, so I&apos;l just resolve this as a duplicate of the bug that I fixed for this.

If you&apos;re still get style errors about this, either let me know or feel free to submit a fix. (It should be trivial especially when you see my previous fix.)

*** This bug has been marked as a duplicate of bug 67797 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>