wstring allocations waste up to 7 wasted bytes. Consequence of having the same code in two places; fx_basic_bstring.cpp is correct, but fx_basic_wstring.cpp is missing one small change. Noticed while working on 542403, but this will not fix that issue. It is just a space savings. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1399983003 .
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp index e7f8c01..c097e1f 100644 --- a/core/src/fxcrt/fx_basic_wstring.cpp +++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -32,7 +32,7 @@ int usableLen = (totalSize - overhead) / sizeof(FX_WCHAR); FXSYS_assert(usableLen >= nLen); - void* pData = FX_Alloc(uint8_t, iSize.ValueOrDie()); + void* pData = FX_Alloc(uint8_t, totalSize); return new (pData) StringData(nLen, usableLen); } CFX_WideString::~CFX_WideString() {