mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
e62f237161
`AutoArraySchemaWriter::FreeFormElement()` is never used, we can remove it. When constructed, `AutoArraySchemaWriter` was optionally taking a `UniqueStrings` reference, which was stored as a pointer. Then `AutoArraySchemaWriter::StringElement()` would do a dangerous `MOZ_RELEASE_ASSERT(mStrings);`. The class is now split in two: - `AutoArraySchemaWriter`, which does not deal with strings at all, so we don't need a pointer to `UniqueStrings`. - `AutoArraySchemaWithStringsWriter` that can also deal with strings, in which we store a (non-null) `UniqueStrings` reference. This is both: - Safer, because it's not possible to instantiate the non-string writer and try to write a string. - More efficient, because we don't need to pass&store a `UniqueStrings` reference/pointer when we don't deal with strings. Differential Revision: https://phabricator.services.mozilla.com/D93191 |
||
---|---|---|
.. | ||
android | ||
baseprofiler | ||
build | ||
dllservices | ||
linker | ||
misc | ||
static | ||
tests | ||
moz.build |