Closed Bug 385349 Opened 14 years ago Closed 2 years ago
JSONString methods when native JSON support is added
Remove methods that do what String.prototype.parseJSON Object.prototype.toJSONString will do automatically: http://lxr.mozilla.org/seamonkey/source/browser/components/sessionstore/src/nsSessionStore.js#1874 and possibly also in /browser/components/places/content/utils.js
Not sure whether a general toJSONString function really helps for SessionStore: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/components/sessionstore/src/nsSessionStore.js&rev=1.62&mark=1926-1927#1913 Currently we just drop unwanted key/value pairs as we go - if we use toJSONString, we'd have to clone and prune the object first which might not be more effective.
14 years ago
thanks for the info about toJSONString () in session store. as gavin points out in bug #386789, we have parseJSON in nsSearchSuggestions.js, too.
For what it's worth we do have native JSON support now.
nsSessionStore.js and Places both were converted to use JSON.jsm, and then later to use native JSON, as far as I know (we're even removing JSON.jsm in bug 462774). Bug 458959 fixed the nsSearchService caller and most others, too, so I think this is probably fixed, at least in non-test code...
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.