New issue
Advanced search Search tips

Issue 921339 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Today
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Scope display two different "this" representations when "this" is referred to in local scope

Reported by jarilval...@gmail.com, Jan 12

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce the problem:
1. Exhaustive list of 'this' cases at https://github.com/gordonmzhu/cheatsheet-js
2. Run each case example
3. Notice on the right sidebar Scopes pane that there are two "this" representations

What is the expected behavior?
There should be only be one "this" representation in local scope.

What went wrong?
¯\_(ツ)_/¯ 

Expected behavior (one "this" representation in Scopes/Local) happens when there is no reference to "this" in the scope of the paused line.

The errant behavior (two "this" representations in Scopes/Local) happens where is a reference to "this" in the scope of the paused line.

Did this work before? Yes 

Chrome version: 71.0.3578.98  Channel: stable
OS Version: OS X 10.14.2
Flash Version: 

Where there are two "this" representations:
- one "this" displays "tiny" representation (e.g. this: Window or this: Object) same as when it's expanded
- one "this" displays "short"/"long" representation showing properties/methods (e.g. this: Window {postMessage f...)
 
Simplified repro:

1. Open the attached test.html
2. Open devtools
3. Refresh the page
4. Look at the "Scope" panel in devtools

Expected: one "this" is shown
Observed: two "this" are shown

Bisected to https://chromium.googlesource.com/chromium/src/+log/ffaf5cce..e0bc8908
Suspecting r568060 V8 roll https://chromium.googlesource.com/v8/v8/+log/f2bcc477..743d013b
Specifically a5b5f8e970b8534d33bb7dfeba0d84ebaa0c31c6 = crrev.com/c/1103576
Landed in 69.0.3465.0
test.html
103 bytes View Download
Labels: -Pri-2 OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Windows Pri-1
Owner: verwa...@chromium.org
Status: Untriaged (was: Unconfirmed)
I can reproduce on Windows 10 as well (71.0.3578.98, 64 bit), probably a cross platform V8/Blink issue.
Regression, so priority 1.
Toon, can you take a look? Thank you!
Cc: swarnasree.mukkala@chromium.org alph@chromium.org
 Issue 890920  has been merged into this issue.
Components: -Platform>DevTools Platform>DevTools>JavaScript Blink>JavaScript>API
Components: -Blink>JavaScript>API
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 16 (6 days ago)

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

commit 876a782c5b68df7e795e03c45c4d4787559864fd
Author: Toon Verwaest <verwaest@chromium.org>
Date: Wed Jan 16 11:34:44 2019

[debugger] Don't collect 'this' for the scope inspector

It's already added somewhere else, and otherwise it shows up twice. We only
need to collect it for DebugEvaluate.

Bug:  chromium:921339 
Change-Id: I8e8890ecf19e0c7d1196c32e9358962c984001da
Reviewed-on: https://chromium-review.googlesource.com/c/1414851
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58844}
[modify] https://crrev.com/876a782c5b68df7e795e03c45c4d4787559864fd/src/debug/debug-scopes.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 16 (6 days ago)

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

commit 876a782c5b68df7e795e03c45c4d4787559864fd
Author: Toon Verwaest <verwaest@chromium.org>
Date: Wed Jan 16 11:34:44 2019

[debugger] Don't collect 'this' for the scope inspector

It's already added somewhere else, and otherwise it shows up twice. We only
need to collect it for DebugEvaluate.

Bug:  chromium:921339 
Change-Id: I8e8890ecf19e0c7d1196c32e9358962c984001da
Reviewed-on: https://chromium-review.googlesource.com/c/1414851
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58844}
[modify] https://crrev.com/876a782c5b68df7e795e03c45c4d4787559864fd/src/debug/debug-scopes.cc

Comment 8 by verwa...@chromium.org, Today (14 hours ago)

Status: Fixed (was: Untriaged)

Sign in to add a comment