Re: Avoiding duplication when passing literal strings repeatedly from C++ to JS

2013-08-15 Thread Nicholas Nethercote
On Thu, Aug 15, 2013 at 4:22 PM, Nicholas Nethercote wrote: > > - Somehow indicate that I want the string on the JS side to be an > JSExternalString. I just had a discussion on #developers with khuey, bent, and jcranmer. AIUI, if I change the |description| parameter to an AString (i.e. a 16-bit

Avoiding duplication when passing literal strings repeatedly from C++ to JS

2013-08-15 Thread Nicholas Nethercote
Hi, When you load about:memory, all the memory reporters run. Each measurement made includes a description, which shows up in about:memory as a tool-tip if you hover over the measurement. These descriptions are string literals in C++ code, and they can be long (e.g. several sentences). They mos