On Mon, Jan 28, 2019 at 04:51:12AM -0800, edusubscr...@gmail.com wrote:
Is it possible to add an extra variable to mozilla string(nsTStringRepr).
I added a bool variable to nsTStringRepr class in Xpcom/Strings/
As something of a side note, the general way to do this is to
add a new data or class flag, and store it in one of the
existing fields:
https://searchfox.org/mozilla-central/rev/5c8ea961d04767db723a0a15e3a8f7fbca154129/xpcom/string/nsTStringRepr.h#300-301
Changing the size or layout of the string class is more or less
guaranteed to cause problems. Aside from affecting the size and
padding of thousands of classes, the strings API is some of the
oldest code in Gecko, and there is almost certainly some subtle
code which makes assumptions about its layout, and will break if
it changes. The Rust bindings are one such example (as you saw),
but there are almost certainly others as well.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform