Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Issue 159156: Add space-saving overloads for DictionaryValue::SetXXX...

Created:
11 years, 5 months ago by sra
Modified:
7 years, 7 months ago
Reviewers:
CC:
chromium-reviews_googlegroups.com, brettw
Visibility:
Public.

Description

Add space-saving overloads for DictionaryValue::SetXXX The problem wil passing string literals like L"harry" to const std::wstring& parameters is that a expression temporary string object is created at the call site. The code to construct and destroy the implicit expression temporary at each call site contributes to the code size. Adding 'const wchar_t*' overloads for these commonly called functions reduces the size of chrome.dll by 17k by moving the code to construct an destroy the temporary into a small number of overloads. BUG=none TEST=none

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -0 lines) Patch
M base/values.h View 1 chunk +4 lines, -0 lines 0 comments Download
M base/values.cc View 2 chunks +19 lines, -0 lines 0 comments Download

Powered by Google App Engine
This is Rietveld 408576698