<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Type bubbles missing for methods"
   href="https://bugs.webkit.org/show_bug.cgi?id=148562#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Type bubbles missing for methods"
   href="https://bugs.webkit.org/show_bug.cgi?id=148562">bug 148562</a>
              from <span class="vcard"><a class="email" href="mailto:joepeck&#64;webkit.org" title="Joseph Pecoraro &lt;joepeck&#64;webkit.org&gt;"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
        <pre>There appear to be multiple issues here. I've broken them out into these test cases.

  1. I don't see any divot registered for computed property methods:
      TEST: o = { [&quot;computed&quot;]() { return 1; }; o.computed();
      TEST: o = { [&quot;computed&quot;]   () { return 1; }; o.computed();

  2. Object literal property methods.
      TEST: o = { method1() { return 1; }; o.method1();

  3. Object literal property methods with spaces in the declaration.
      TEST: o = { method1  () { return 1; }; o.method1();

The patch below gets (2), which I think is the common case of object literal property methods, working. It seems the divot for (2) is the last character of the method name, but the divot for (3) is the '(' character. All of these could likely benefit from cleanup in the backend.

<span class="quote">&gt; --- a/Source/JavaScriptCore/runtime/TypeProfiler.cpp
&gt; +++ b/Source/JavaScriptCore/runtime/TypeProfiler.cpp
&gt; &#64;&#64; -783,6 +787,12 &#64;&#64; WebInspector.ScriptSyntaxTree = class ScriptSyntaxTree extends WebInspector.Obje
&gt;              if (result.kind === &quot;get&quot; || result.kind === &quot;set&quot;) {
&gt;                  result.value.isGetterOrSetter = true;
&gt;                  result.value.getterOrSetterRange = result.key.range;
&gt; +            } else if (node.method) {
&gt; +                // FIXME: &lt;<a href="https://webkit.org/b/143171">https://webkit.org/b/143171</a>&gt; Web Inspector: Improve Type Profiler Support for ES6 Syntax
&gt; +                // The backend has confusing handling of the divot here.
&gt; +                // Though this is not always result.key.range[1], it often is.
&gt; +                result.value.isGetterOrSetter = true;
&gt; +                result.value.getterOrSetterRange = [result.key.range[1], result.value.range[1]];
&gt;              }
&gt;              break;
&gt;          case &quot;ReturnStatement&quot;:</span >

Saam, maybe you can advise me here, since I understand this is a particular tricky area of Type Profiling (divots).</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>