RESOLVED FIXED Bug 40140
Web Inspector: it would be better to print object properties in order of insertion.
https://bugs.webkit.org/show_bug.cgi?id=40140
Summary Web Inspector: it would be better to print object properties in order of inse...
Ilya Tikhonovsky
Reported 2010-06-03 14:16:42 PDT
we have dumpObject function in inspector-test.js which is used for dumping timeline records, resource records, etc. It would be better to dump object properties in alphabetical order to avoid an inconsistency when we switch to native json serialization of timeline data.
Attachments
[patch] initial version. (18.63 KB, patch)
2010-06-03 14:20 PDT, Ilya Tikhonovsky
pfeldman: review-
[patch] second iteration (2.96 KB, patch)
2010-06-04 08:20 PDT, Ilya Tikhonovsky
pfeldman: review+
pfeldman: commit-queue-
Ilya Tikhonovsky
Comment 1 2010-06-03 14:20:37 PDT
Created attachment 57813 [details] [patch] initial version.
Pavel Feldman
Comment 2 2010-06-03 15:07:37 PDT
Comment on attachment 57813 [details] [patch] initial version. I'd rather make sure that native serialization supports original enumerable properties order. It might require adding another vector into the object class, but we should totally do that.
Ilya Tikhonovsky
Comment 3 2010-06-04 00:13:19 PDT
(In reply to comment #2) > (From update of attachment 57813 [details]) > I'd rather make sure that native serialization supports original enumerable properties order. It might require adding another vector into the object class, but we should totally do that. ECMA standard doesn't specify the order of enumerable properties but major browsers do that in the order of insertion. http://bclary.com/2004/11/07/#a-12.6.4
Ilya Tikhonovsky
Comment 4 2010-06-04 08:20:58 PDT
Created attachment 57880 [details] [patch] second iteration now we should push object properties to json string in order of insertion.
Pavel Feldman
Comment 5 2010-06-04 08:28:02 PDT
Comment on attachment 57880 [details] [patch] second iteration WebCore/inspector/InspectorValues.h:  + m_data.set(name, InspectorBasicValue::create(value)); what about calling set(name, InspectorBasicValue::create(value)) here and below?
Ilya Tikhonovsky
Comment 6 2010-06-04 10:23:41 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/InspectorValues.cpp M WebCore/inspector/InspectorValues.h Committed r60687
Note You need to log in before you can comment on or make changes to this bug.