console.log() prints array literal when property name of object passed to console.log() is 0 or '0'
Categories
(DevTools :: Console, defect, P3)
Tracking
(firefox74 fixed)
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: guest271314, Assigned: pranavpandey1998official, NeedInfo)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
If there are no other use cases known than jQuery, it makes sense to align with the expected behavior and what other browsers do.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 4•5 years ago
|
||
Hello Jacob, thanks for offering help!
if it's your first time contributing, I suggest to go through http://docs.firefox-dev.tools/getting-started/ to setup the work environment first.
This is the place where we declare such Object as arrays: devtools/server/actors/object/previewers.js#886-950
I think we can delete this whole function, and we shouldn't have those kind of object anymore.
After that, we'll probably need to remove some test (like this one devtools/server/tests/unit/test_objectgrips-array-like-object.js ), or update other ones.
Let me know if you have any trouble, either in this bug or on our Slack.
Updated•5 years ago
|
Hi Nicolas,
Thanks for the reply regarding this bug.
I have made the changes as follows:
-
Deleted the pseudoArray() function which was in https://github.com/makuerj/gecko-dev/tree/bug-1517969/devtools/server/actors/object/previewers.js
-
Deleted the tests for this feature by deleting the file https://github.com/makuerj/gecko-dev/tree/bug-1517969/devtools/server/tests/unit/test_objectgrips-array-like-object.js
3 Modified the file https://github.com/makuerj/gecko-dev/tree/bug-1517969/devtools/server/tests/unit/xpcshell.ini to stop running tests on the array-like feature.
The changes can be seen in the patch file here https://github.com/makuerj/gecko-dev/blob/bug-1517969/doc/1517969.patch
Thanks,
Jacob
In addition, here is the behavior of objects in the developer console after the fix.
https://github.com/makuerj/gecko-dev/blob/bug-1517969/doc/After.png
Thanks,
Jacob
Comment 7•5 years ago
|
||
Hello Jacob, thanks for the patch.
We're using a dedicated tool for the reviews, could you read https://docs.firefox-dev.tools/contributing/making-prs.html and push your patch there please? Thanks!
Comment 9•5 years ago
|
||
Hello Jacob,
Do you need help pushing the patch to phabricator?
Comment 10•5 years ago
|
||
Since we didn't hear from Jacob for 2 months, I'm going to unassign this bug.
Jacob, if you're still working on this let me know and I'll reassign it :)
Assignee | ||
Comment 11•5 years ago
|
||
hi can i take this
Comment 12•5 years ago
|
||
Assignee | ||
Comment 13•5 years ago
|
||
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
Description
•