New issue
Advanced search Search tips

Issue 843603 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 688137
Owner: ----
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Console output mismatch.

Reported by romul1...@gmail.com, May 16 2018

Issue description

Chrome Version (from the about:version page): Version 65.0.3325.181 (Official Build) Built on Ubuntu , running on LinuxMint 18.2 (64-bit)
Is this the most recent version: no
OS + version: Linux Mint 18
CPU architecture (32-bit / 64-bit): 64
Window manager: Cinnamon 3.0
URLs (if relevant):
Behavior in Linux Firefox: Same shit
Behavior in Windows Chrome (if you have access to it):

What steps will reproduce the problem?
(1) i change object, add attr obj.selected = !obj.selected
(2) run if (obj.selected = false) {} // i know, this is mistake, i'm prodigy
(3) check this in console

What is the expected result?

selected: false in preview and selected false in tree.

What happens instead?

selected: true in preview and selected false in tree.

my code:

                lang.selected = !lang.selected;
                console.log(lang);
                if (lang.selected = false) { }
 
Selection_132.png
14.6 KB View Download

Comment 1 by romul1...@gmail.com, May 16 2018

i check this behavior with other options:

var a = {'b': 3, 'd': 4, 'c': true};
console.log(a);
a.c = false;
a.d = 1
a.b = 5
lol.png
3.1 KB View Download

Comment 2 by woxxom@gmail.com, May 16 2018

This is a duplicate of  issue 690113 .

  >Logged objects show snapshots.  
  >When clicking the expand arrow the first time, it evaluates the contents, as hinted by the 'i' icon.

In other words, the object preview correctly reflects the state of the object at the moment console.log was invoked in your code. However, when you expand the object, its current value is shown, not the original one. This is a known peculiarity of devtools which you can circumvent by deep-cloning the object e.g. console.log(JSON.parse(JSON.stringify(obj))) or by using a specialized deepCopy() function from the framework/library of your app. The reason devtools acts this way is to avoid unpredictable slowdowns which would ensue if devtools cloned the objects internally for each console invocation.
Components: Platform>DevTools
Labels: Needs-Triage-M65
Labels: -Needs-Triage-M65 Needs-Milestone

Comment 6 by romul1...@gmail.com, May 17 2018

thank you for advance
Cc: rbasuvula@chromium.org
Labels: M-68 FoundIn-68 Target-68 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Thanks for filing the issue!
Tested the issue on chrome #65.0.3325.181,Stable #66.0.3359.181 & Canary 68.0.3436.0 in Linux Debian Rodete and was able to reproduce the issue.

This is a Non-Regression issue since seeing this from M60 #60.0.3072.0, Making the status to Untriaged so that the issue would get addressed.

Note : Able to reproduce the issue in MAC 10.12 and win 10.Please find the screen shot for reference.

Thank you!
843603.png
113 KB View Download
Mergedinto: 688137
Status: Duplicate (was: Untriaged)

Sign in to add a comment