New issue
Advanced search Search tips

Issue 870957 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 28
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Error stack trace displayed incorrectly

Reported by hakerh403@gmail.com, Aug 4

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

Steps to reproduce the problem:
1. Type this code in the console: []['\n    at']()

What is the expected behavior?
The following stack trace should be displayed:

Uncaught TypeError: [].
    at is not a function
    at <anonymous>:1:15

What went wrong?
The following stack trace is displayed instead:

Uncaught TypeError: [].
    at is not a function
    at is not a function
    at <anonymous>:1:15

The line "at is not a function" is duplicated, while it shouldn't be.

Notice that the following code:

[]['\n    a']()

doesn't cause the bug. My guess is that Chrome is searching for "at" phrase in the error message and hack something around it, while it shouldn't. I don't know if this is devtools issue or v8 issue, but the bug is not seen in Node.js, so I suppose it's devtools only issue.

Did this work before? N/A 

Chrome version: 67.0.3396.87  Channel: stable
OS Version: 6.3
Flash Version: /
 
screencast.webm
268 KB View Download
Bisected to https://chromium.googlesource.com/chromium/src/+log/fe802a95..7075e7b6?pretty=fuller
Suspecting 12e4094f1942c015925e406c7ce86c9cdafea645
"[DevTools] Pass error object when reporting exceptions."
Landed in 54.0.2814.0
Labels: Needs-Milestone
Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)
Yes, we search for "at".
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 28

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/a55e009f3a05fb3d0522d83bf0a2935362255d7a

commit a55e009f3a05fb3d0522d83bf0a2935362255d7a
Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org>
Date: Fri Sep 28 19:15:45 2018

inspector: simplify preview generator for Error objects

- we can avoid using regexps,
- this CL also fixed a bug.

R=alph@chromium.org

Bug:  chromium:870957 
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I9799507b85942be454a7c20d2768fe7442fc965e
Reviewed-on: https://chromium-review.googlesource.com/1250403
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56295}
[modify] https://crrev.com/a55e009f3a05fb3d0522d83bf0a2935362255d7a/src/inspector/injected-script-source.js
[add] https://crrev.com/a55e009f3a05fb3d0522d83bf0a2935362255d7a/test/inspector/runtime/error-preview-expected.txt
[add] https://crrev.com/a55e009f3a05fb3d0522d83bf0a2935362255d7a/test/inspector/runtime/error-preview.js

Status: Fixed (was: Assigned)

Sign in to add a comment