Mojo JS Bindings: Prevent issues with method parameter names.

- Append '_' to parameter names which are also reserved keywords in
  JavaScript. Struct field names remain unchanged as such keywords
  still work there.

- Rename "params" variable in generated Proxy.prototype.{{method.name}}
  to prevent a parameter named "params" from breaking the bindings.

Bug: 826070
Change-Id: I29046179929df18e14f63ff4d1cc3a74c1ef71e0
Reviewed-on: https://chromium-review.googlesource.com/1009347
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oliver Chang <ochang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550420}

CrOS-Libchrome-Original-Commit: 4443328b475395ac74c06782b14449901e988260
3 files changed
tree: 36c9ac1b7ca56e9110ab1558c074c1847a5d6f07
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/