New issue 50316 by chengzp.1: Console.log gives incorrect output in Chrome
Developer Tools console
http://code.google.com/p/chromium/issues/detail?id=50316
Chrome Version : 5.0.375.99 (Official Build 51029)
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 4: n/a
Firefox 3.x: (firebug) OK
IE 7: n/a
IE 8: n/a
What steps will reproduce the problem?
Execute:
var arr = [0, 1, 2];
for (var i=0; i<arr.length; i++) {
arr[i] = -1;
console.log(arr);
}
What is the expected result?
[-1, 1, 2]
[-1, -1, 2]
[-1, -1, -1]
What happens instead?
3 [-1, -1, -1]
I am having a simular problem when i am mutating an object and doing
console.log()'s along the way.
the result for the object only reports the most recent version.
this is occurring in chrome 12
Blog entry with more tests and comparison to Firebug:
http://techblog.appnexus.com/2011/webkit-chrome-safari-console-log-bug/
Issue 94887 has been merged into this issue.
Comment #10 on issue 50316 by pfeld...@chromium.org: Console.log gives
incorrect output in Chrome Developer Tools console
http://code.google.com/p/chromium/issues/detail?id=50316
Issue 105559 has been merged into this issue.
related upstream bug: https://bugs.webkit.org/show_bug.cgi?id=35801
Issue 107828 has been merged into this issue.