This commit addresses an issue resulting from a change [1] in the
jni_zero project, where the format of classpath entries changed
(from using slashes 'org/webrtc/PeerConnectionFactory'
to dots 'org.webrtc.PeerConnectionFactory'). These changes led to
failures in the Chromium rolls in WebRTC, as the Class loader in JNI
was not designed to handle class names with dots.
This CL fixes this issue by changing webrtc::GetClass to convert class
paths to what JNI expects.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/5234469
Bug: chromium:1377351
Change-Id: I2f243bb4ed04136f86510fcd5472e9bfc2d4ba85
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337900
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41666}
Using relative paths for JNI includes is causing build failures in chromium.
WebRTC already uses full include paths for generated JNI headers, so this CL
just removes the "jni_package" parameter from WebRTC generate_jni() targets
and removes the "jni/" portion of includes. The "jni_package" variable will be
removed from the generate_jni() template shortly.
To fix includes:
find . -name *.cc -exec sed -i -E 's@(#include.+generated.+jni)/jni/(.+_jni.h)@\1/\2@' {} \;
See https://groups.google.com/a/chromium.org/forum/?#!topic/java/MEovGrAwbqI
for discussion on naming scheme.
No-Try: True
TBR: kwiberg@webrtc.org
Bug: chromium:964169
Change-Id: I758c1b41bf6f5005587e55b82f14065fe251baad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143521
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28380}
This CL removes the use of the @JNINamespace annotation and instead
sets the correct JNI namespace in the build file.
Bug: webrtc:8278
Change-Id: Ia4490399e45a97d56b02c260fd80df4edfa092bf
Reviewed-on: https://webrtc-review.googlesource.com/76440
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23299}