Bug 1777275 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

grepping through https://hg.mozilla.org/integration/autoland/rev/71c27941e870eaf684830af8101296a43ee245fd ("Bug 1773604 - Update bundled protobuf to version 21.2"), for `static`, it looks like the new static variables are all of the form:
```c++
static const ClassData _class_data_;
```

...whose instances seem to be defined/constructed like so:
```c++
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Api::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Api::MergeImpl
};
```
https://hg.mozilla.org/integration/autoland/rev/71c27941e870eaf684830af8101296a43ee245fd#l9.797

The struct itself is defined here:
https://hg.mozilla.org/integration/autoland/rev/71c27941e870eaf684830af8101296a43ee245fd#l91.252

So if we take action or suggest-upstream-fixes on this, it would probably be something associated with that type and its instances.

Having said that, I also don't know what the real-world impact of these new variables is. (They seem to be POD, i.e. structs that just contain two pointers [fucntion-pointers]. Each static constructor here would just set those two pointers and be done.)
grepping through https://hg.mozilla.org/integration/autoland/rev/71c27941e870eaf684830af8101296a43ee245fd ("Bug 1773604 - Update bundled protobuf to version 21.2"), for `static`, it looks like the new static variables are all of the form:
```c++
static const ClassData _class_data_;
```

...whose instances seem to be defined/constructed like so:
```c++
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Api::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Api::MergeImpl
};
```
https://hg.mozilla.org/integration/autoland/rev/71c27941e870eaf684830af8101296a43ee245fd#l9.797

The struct itself is defined here:
https://searchfox.org/mozilla-central/rev/2946e9b450cb35afaf8dad927a8d187975dcd74d/toolkit/components/protobuf/src/google/protobuf/message.h#370
https://hg.mozilla.org/integration/autoland/rev/71c27941e870eaf684830af8101296a43ee245fd#l91.252

So if we take action or suggest-upstream-fixes on this, it would probably be something associated with that type and its instances.

Having said that, I also don't know what the real-world impact of these new variables is. (They seem to be POD, i.e. structs that just contain two pointers [fucntion-pointers]. Each static constructor here would just set those two pointers and be done.)

Back to Bug 1777275 Comment 3