<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects"
   href="https://bugs.webkit.org/show_bug.cgi?id=146177#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: AXObjectCache should try to use an unignored accessibilityObject when posting a selection notification when on the border between two accessibilityObjects"
   href="https://bugs.webkit.org/show_bug.cgi?id=146177">bug 146177</a>
              from <span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=146177#c4">comment #4</a>)
<span class="quote">&gt; Can adopt just be a free function in JSRetainPtr.h like
&gt; 
&gt; template&lt;typename T&gt; JSRetainPtr&lt;T&gt; adopt(T value)
&gt; {
&gt;     return JSRetainPtr&lt;T&gt;(Adopt, value);
&gt; }
&gt; 
&gt; or should it be a static method on JSRetainPtr (or something else)?</span >

It can and should be something like that, but that template is too generic and would apply to too many different classes. Instead we should just do overloading, I think:

    inline JSRetainPtr&lt;JSStringRef&gt; adopt(JSStringRef string)
    {
        return JSRetainPtr&lt;JSStringRef&gt;(Adopt, string);
    }

We can overload for other types as needed. Not sure what types JSRetainPtr supports.

Later we will want to make the JSRetainPtr constructor for Adopt be private and move to this function exclusively.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>