New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 654018 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

DevTools: double function name in async/await call stack

Project Member Reported by paulir...@chromium.org, Oct 7 2016

Issue description

Repro: Run this on chrome's new tab (or some other page that it works on)

    async function getResponseSize(url) {

      function doThat() {
        debugger;
        const value = result.value;
        total += value.length;
        console.log('Received chunk', value);
      }

      async function getStuff() {
        while ((result = await reader.read()) && !result.done) {
          doThat();
        }
      }

      const response = await fetch(url);
      const reader = response.body.getReader();
      let result;
      let total = 0;

      total = getStuff()

      return total;
    }

    getResponseSize('/');


Functions get duplicated in the callstack. 
Not too bad, but kinda annoying.
 
Screen Shot 2016-10-07 at 12.37.57 PM.png
37.6 KB View Download
Screenshot from 2016-10-20 13:28:34.png
65.8 KB View Download
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7534dfcb230327db0a378dd57413d8886ac924d3

commit 7534dfcb230327db0a378dd57413d8886ac924d3
Author: kozyatinskiy <kozyatinskiy@chromium.org>
Date: Sat Oct 22 03:03:58 2016

[DevTools] Better label for async function call stacks

Async call stack with async function always contains (async function) label and async function as top frame for following stack. We can merge label with this frame for better user experience.

R=dgozman@chromium.org,littledan@chromium.org
BUG= 654018 , 621515 

Review-Url: https://chromiumcodereview.appspot.com/2384533002
Cr-Commit-Position: refs/heads/master@{#426960}

[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/SlowTests
[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await1-expected.txt
[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await2-expected.txt
[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/inspector/sources/debugger-async/async-await/async-callstack-async-await3-expected.txt
[add] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function-expected.txt
[add] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html
[delete] https://crrev.com/87303d73f481bfa8acb3508180070ca70cecd4ca/third_party/WebKit/LayoutTests/virtual/asyncawait/README.txt
[delete] https://crrev.com/87303d73f481bfa8acb3508180070ca70cecd4ca/third_party/WebKit/LayoutTests/virtual/asyncawait/inspector/sources/debugger-async/async-await/README.txt
[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
[modify] https://crrev.com/7534dfcb230327db0a378dd57413d8886ac924d3/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js

Status: Fixed (was: Assigned)

Sign in to add a comment