Chromium Code Reviews| Index: chrome/renderer/resources/extensions/event.js |
| diff --git a/chrome/renderer/resources/extensions/event.js b/chrome/renderer/resources/extensions/event.js |
| index a69e47428c43ad2515a2f8091be4ea011ab1f3a2..ad482d4f2794b2f3aef59b45d90bdb4c35eb31ec 100644 |
| --- a/chrome/renderer/resources/extensions/event.js |
| +++ b/chrome/renderer/resources/extensions/event.js |
| @@ -139,7 +139,12 @@ |
| chromeHidden.Event.dispatchJSON = function(name, args) { |
| if (attachedNamedEvents[name]) { |
| if (args) { |
| - args = chromeHidden.JSON.parse(args); |
| + // This is an antiquity. Until all callers of dispatchJSON use actual |
|
asargent_no_longer_on_chrome
2012/06/18 16:25:30
You can add TODO(asargent) to this comment. (There
Garret Kelly
2012/06/18 18:15:01
Done.
|
| + // values, this must remain here to catch the cases where a caller has |
| + // hard-coded a JSON string to pass in. |
| + if (typeof(args) == "string") { |
| + args = chromeHidden.JSON.parse(args); |
| + } |
| if (eventArgumentMassagers[name]) |
| eventArgumentMassagers[name](args); |
| } |