Closed
Bug 450879
Opened 16 years ago
Closed 16 years ago
consistently use JSON objects instead of our own quirky string serialization
Categories
(Firefox :: Session Restore, defect)
Firefox
Session Restore
Tracking
()
RESOLVED
FIXED
People
(Reporter: zeniko, Assigned: zeniko)
Details
Attachments
(1 file)
2.36 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
While working on bug 346337, I've stumbled over several issues with the current string serialization we use for storing text data and tab attributes. The text data serialization is going away in bug 346337, so the tab attribute serialization should just change as well, from
xultab: "key=a%20value key2=next%20value"
to
attributes: { key: "a value", key2: "next value" }
Additionally, this will make the lives of extension authors (and whoever wants direct access to this data) simpler.
Assignee | ||
Comment 1•16 years ago
|
||
Why ever we haven't used this format from the start... :(
Attachment #334096 -
Flags: review?(dietrich)
Comment on attachment 334096 [details] [diff] [review]
simple fix
>+ for (let name in tabData.attributes)
>+ tab.setAttribute(name, tabData.attributes[name]);
Why not
for (let [ name, value ] in tabData.attributes)
tab.setAttribute(name, value)
?
Comment 3•16 years ago
|
||
Comment on attachment 334096 [details] [diff] [review]
simple fix
r=me
Attachment #334096 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 4•16 years ago
|
||
(In reply to comment #2)
> for (let [ name, value ] in tabData.attributes)
Because I'm a traditionalist. ;-) Besides, your suggestion wouldn't work anyway, as tabData.attributes can be undefined and the Iterator doesn't accept that. (BTW: Your code sample is missing that very same Iterator - cf. <http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Looping_across_objects>).
Assignee: nobody → zeniko
Keywords: checkin-needed
Comment 5•16 years ago
|
||
Pushed to mozilla-central: https://hg.mozilla.org/mozilla-central/index.cgi/rev/3d769b6b1c4c
You need to log in
before you can comment on or make changes to this bug.
Description
•