gecko-dev/mobile/android/annotations
Nicolas Guichard 2c14fb7559 Bug 1865048 - Move the wrapped class name initialization to the header of JNI wrappers. r=owlish,geckoview-reviewers
This is intended for Searchfox, to analyse and display the bindings
between Java and C++ code.

When the @WrapForJNI annotation is set on a method marked as native,
the code generator creates 3 files, for instance for EventDispatcher:
 * GeneratedJNIEventDispatcherWrappers.cpp
 * GeneratedJNI/EventDispatcherWrappers.h
 * GeneratedJNI/EventDispatcherNatives.h

The class that implements the member function bound from Java inherits
from EventDispatcher::Natives. That member function is defined in yet
another implementation file.

The mozsearch clang plugin only sees one single translation unit at a
time, so when it sees the definition of the actual bound method (and
when it emits the related data), it doesn't see the EventDispatcher
wrappers implementation anymore. At the moment it misses the name of
the wrapped Java class qualified class name.

This moves the name initialization from the wrappers impl file to the
header so that the mozsearch clang plugin can see the whole picture at
once when analysing the actual member functions' implementations.

The Java class members names were already initialized in the header so
this also makes things a bit more consistent in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D196795
2023-12-28 22:47:46 +00:00
..
src/main/java/org/mozilla/gecko/annotationProcessors Bug 1865048 - Move the wrapped class name initialization to the header of JNI wrappers. r=owlish,geckoview-reviewers 2023-12-28 22:47:46 +00:00
build.gradle Bug 1837640 - Target JVM 17 bytecode in GeckoView. r=geckoview-reviewers,owlish 2023-06-12 22:27:13 +00:00