зеркало из https://github.com/mozilla/pjs.git
fix 29333 make the initial construction passing "" for performance and legal nsString usage. r=rickg a=bobj
This commit is contained in:
Родитель
3a67f9317c
Коммит
e5cb538388
|
@ -682,7 +682,7 @@ char* nsString::ToNewCString() const {
|
||||||
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
|
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
|
||||||
*/
|
*/
|
||||||
char* nsString::ToNewUTF8String() const {
|
char* nsString::ToNewUTF8String() const {
|
||||||
nsCString temp(*this);
|
nsCString temp("");
|
||||||
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
|
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
|
||||||
|
|
||||||
// Caculate how many bytes we need
|
// Caculate how many bytes we need
|
||||||
|
|
|
@ -682,7 +682,7 @@ char* nsString::ToNewCString() const {
|
||||||
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
|
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
|
||||||
*/
|
*/
|
||||||
char* nsString::ToNewUTF8String() const {
|
char* nsString::ToNewUTF8String() const {
|
||||||
nsCString temp(*this);
|
nsCString temp("");
|
||||||
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
|
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
|
||||||
|
|
||||||
// Caculate how many bytes we need
|
// Caculate how many bytes we need
|
||||||
|
|
|
@ -682,7 +682,7 @@ char* nsString::ToNewCString() const {
|
||||||
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
|
* http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html
|
||||||
*/
|
*/
|
||||||
char* nsString::ToNewUTF8String() const {
|
char* nsString::ToNewUTF8String() const {
|
||||||
nsCString temp(*this);
|
nsCString temp("");
|
||||||
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
|
temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one.
|
||||||
|
|
||||||
// Caculate how many bytes we need
|
// Caculate how many bytes we need
|
||||||
|
|
Загрузка…
Ссылка в новой задаче