jni: Forbid inappropriate JNI parameter conversions.

Don't allow JavaParamRefs to be used to construct ScopedJavaLocalRefs.
This leads to incorrect reference handling behaviour, since parameters
are not allowed to be deleted. Instead code should simply pass the
JavaParamRef by reference; functions should be taking "const JavaRef&"
for input which is compatible.

Fix the cases in the code where this conversion is currently being
relied upon.

BUG=506850

Review URL: https://codereview.chromium.org/1326763009

Cr-Commit-Position: refs/heads/master@{#347923}


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