Skip to content

Commit b7b3125

Browse files
committed
compatJSON.encode is reportedly deprecated, -> JSON.stringify
1 parent 5182c27 commit b7b3125

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/ssl-observatory.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ function SSLObservatory() {
108108
// and to protect against CSRF
109109
this.csrf_nonce = "#"+Math.random().toString()+Math.random().toString();
110110

111-
this.compatJSON = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
112-
113111
var pref_service = Components.classes["@mozilla.org/preferences-service;1"]
114112
.getService(Components.interfaces.nsIPrefBranchInternal);
115113
var branch = pref_service.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
@@ -782,9 +780,9 @@ SSLObservatory.prototype = {
782780
if (this.myGetBoolPref("testing")) {
783781
reqParams.push("testing=1");
784782
// The server can compute these, but they're a nice test suite item!
785-
reqParams.push("fplist="+this.compatJSON.encode(c.fps));
783+
reqParams.push("fplist="+JSON.stringify(c.fps));
786784
}
787-
reqParams.push("certlist="+this.compatJSON.encode(base64Certs));
785+
reqParams.push("certlist="+JSON.stringify(base64Certs));
788786

789787
if (resubmitting) {
790788
reqParams.push("client_asn="+ASN_UNKNOWABLE);

0 commit comments

Comments
 (0)