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: /
,
Aug 6
,
Aug 13
Yes, we search for "at".
,
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
,
Sep 28
|
||||
►
Sign in to add a comment |
||||
Comment 1 by woxxom@gmail.com
, Aug 4