[Webkit-unassigned] [Bug 148562] Web Inspector: Type bubbles missing for methods

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 28 00:00:04 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=148562

--- Comment #3 from Joseph Pecoraro <joepeck at webkit.org> ---
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 = { ["computed"]() { return 1; }; o.computed();
      TEST: o = { ["computed"]   () { 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.

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

Saam, maybe you can advise me here, since I understand this is a particular tricky area of Type Profiling (divots).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150828/afbe5942/attachment.html>


More information about the webkit-unassigned mailing list