mirror of
https://github.com/google/nomulus
synced 2026-09-21 07:24:26 +00:00
Use JSON.parse instead of deprecated goog.json.parse.
Thanks to [] shared libraries at Google now produce valid JSON which allows using JSON.parse. It is safer and faster than goog.json.parse which uses eval by default.
NOTE: All shared libraries producing JSON at Google were changed to produce valid JSON. However, if your code uses a custom way of producing JSON (not using the shared libraries) or if your code parses JSON generated a long time ago and stored, this CL might break you so please review with care.
Design doc: []
Tested:
TAP --sample for global presubmit queue
[]
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166454709
This commit is contained in:
@@ -285,7 +285,7 @@ registry.registrar.Payment.prototype.onMessage_ = function(e) {
|
||||
}
|
||||
var data;
|
||||
try {
|
||||
data = goog.json.parse(msg.data);
|
||||
data = /** @type {!Object} */ (JSON.parse(msg.data));
|
||||
} catch (ex) {
|
||||
// TODO(b/26876003): Figure out why it's possible that the Braintree iframe
|
||||
// is able to propagate messages up to our level.
|
||||
|
||||
Reference in New Issue
Block a user