Recently bug 539710 landed[0] to fix an unnecessary and apparently unsafe operation:
const PRUnichar *comma = NS_LITERAL_STRING(",").get(); Curious, I did a quick search for other examples of NS_LITERAL_STRING combined with .get() and found that this appears to be common[1]. So, I have a few questions for anyone with some insight: - Is this pattern always unsafe? - Is it sometimes unsafe? (if so, when/why?) - Should we do some cleanup and avoid things like this? (or maybe this is an outdated concern and isn't an issue anymore?) Cheers, David [0] https://bugzilla.mozilla.org/show_bug.cgi?id=539710 [1] https://mxr.mozilla.org/mozilla-central/search?string=NS_LITERAL_STRING.*get®exp=1&case=1&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform