mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1209574 - Generate constants for non-accessible static final fields; r=snorp
We try to generate a C++ constant for static final fields, but that was failing for inaccessible fields. Now we set the field to be accessible so that we do end up generating a C++ constant.
This commit is contained in:
parent
a0ee2ee496
commit
2cc9923726
@ -392,6 +392,7 @@ public class CodeGenerator {
|
||||
if (isStatic && isFinal && (type.isPrimitive() || type == String.class)) {
|
||||
Object val = null;
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
val = field.get(null);
|
||||
} catch (final IllegalAccessException e) {
|
||||
}
|
||||
|
@ -1507,14 +1507,6 @@ auto SQLiteBridgeException::New(mozilla::jni::String::Param a0) -> SQLiteBridgeE
|
||||
return mozilla::jni::Constructor<New2_t>::Call(nullptr, nullptr, a0);
|
||||
}
|
||||
|
||||
constexpr char SQLiteBridgeException::SerialVersionUID_t::name[];
|
||||
constexpr char SQLiteBridgeException::SerialVersionUID_t::signature[];
|
||||
|
||||
auto SQLiteBridgeException::SerialVersionUID() -> int64_t
|
||||
{
|
||||
return mozilla::jni::Field<SerialVersionUID_t>::Get(nullptr, nullptr);
|
||||
}
|
||||
|
||||
constexpr char Clipboard::name[];
|
||||
|
||||
constexpr char Clipboard::ClearText_t::name[];
|
||||
|
@ -3647,21 +3647,7 @@ public:
|
||||
static auto New(mozilla::jni::String::Param) -> SQLiteBridgeException::LocalRef;
|
||||
|
||||
public:
|
||||
struct SerialVersionUID_t {
|
||||
typedef SQLiteBridgeException Owner;
|
||||
typedef int64_t ReturnType;
|
||||
typedef int64_t SetterType;
|
||||
typedef mozilla::jni::Args<> Args;
|
||||
static constexpr char name[] = "serialVersionUID";
|
||||
static constexpr char signature[] =
|
||||
"J";
|
||||
static const bool isStatic = true;
|
||||
static const bool isMultithreaded = true;
|
||||
static const mozilla::jni::ExceptionMode exceptionMode =
|
||||
mozilla::jni::ExceptionMode::ABORT;
|
||||
};
|
||||
|
||||
static auto SerialVersionUID() -> int64_t;
|
||||
static const int64_t SerialVersionUID = 1;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user