diff options
author | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 08:27:40 +0000 |
---|---|---|
committer | mnaganov@chromium.org <mnaganov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-19 08:27:40 +0000 |
commit | f4d7feacd341fcdf796882be07a486ae62ccdd84 (patch) | |
tree | 24d0c8e906aa720c855691f9c283ebb453f5271f /chrome/common | |
parent | 46f89e149da3971fcf52b778de939256fae4249a (diff) | |
download | chromium_src-f4d7feacd341fcdf796882be07a486ae62ccdd84.zip chromium_src-f4d7feacd341fcdf796882be07a486ae62ccdd84.tar.gz chromium_src-f4d7feacd341fcdf796882be07a486ae62ccdd84.tar.bz2 |
Introduce "--enable-memory-info" command-line flag to enable reporting
of JS heap size via "console.memory" (for now) and
"webkitPerformance.memory" (having Web Timing enabled).
BUG=43281
TEST=none
Review URL: http://codereview.chromium.org/3017007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52886 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 8d99b6ba..7da1430 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -339,6 +339,9 @@ const char kEnableGPURendering[] = "enable-gpu-rendering"; // builds. const char kEnableLogging[] = "enable-logging"; +// Allows reporting memory info (JS heap size) to page. +const char kEnableMemoryInfo[] = "enable-memory-info"; + // On Windows, converts the page to the currently-installed monitor profile. // This does NOT enable color management for images. The source is still // assumed to be sRGB. diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 4f96654..30a2997 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -110,6 +110,7 @@ extern const char kEnableIndexedDatabase[]; extern const char kEnableInMemoryURLIndex[]; extern const char kEnableIPv6[]; extern const char kEnableLogging[]; +extern const char kEnableMemoryInfo[]; extern const char kEnableMonitorProfile[]; extern const char kEnableNaCl[]; extern const char kEnableNativeWebWorkers[]; diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 5c3370c..82888e6 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -2023,6 +2023,7 @@ struct ParamTraits<WebPreferences> { WriteParam(m, p.experimental_webgl_enabled); WriteParam(m, p.show_composited_layer_borders); WriteParam(m, p.accelerated_compositing_enabled); + WriteParam(m, p.memory_info_enabled); } static bool Read(const Message* m, void** iter, param_type* p) { return @@ -2066,7 +2067,8 @@ struct ParamTraits<WebPreferences> { ReadParam(m, iter, &p->allow_file_access_from_file_urls) && ReadParam(m, iter, &p->experimental_webgl_enabled) && ReadParam(m, iter, &p->show_composited_layer_borders) && - ReadParam(m, iter, &p->accelerated_compositing_enabled); + ReadParam(m, iter, &p->accelerated_compositing_enabled) && + ReadParam(m, iter, &p->memory_info_enabled); } static void Log(const param_type& p, std::wstring* l) { l->append(L"<WebPreferences>"); |