summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/node_leak_test.cc
diff options
context:
space:
mode:
authorfqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 17:29:05 +0000
committerfqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 17:29:05 +0000
commit296d61e24b5a5311f120a767a59ac006176f6f9a (patch)
tree2b70d0a190ab2719137b274bd63b6fc83ce02bde /webkit/tools/test_shell/node_leak_test.cc
parent99b362e5289d111296f72404e7ea1b4cbe7a07cf (diff)
downloadchromium_src-296d61e24b5a5311f120a767a59ac006176f6f9a.zip
chromium_src-296d61e24b5a5311f120a767a59ac006176f6f9a.tar.gz
chromium_src-296d61e24b5a5311f120a767a59ac006176f6f9a.tar.bz2
Add GCController support to test_shell.
This is done in the binding layer, GCController is a JS object, GCController.collect() is a JS function which calls gc(). GCController object can be enabled by calling ScriptController::setShouldExposeGCController(true); GCController.collect() needs V8 expose gc function, which is controlled by a flag '--expose-gc'. Otherwise GCController.collect() has no effect. By default, test_shell exposes both gc function and GCController object. Review URL: http://codereview.chromium.org/10719 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/node_leak_test.cc')
-rw-r--r--webkit/tools/test_shell/node_leak_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/node_leak_test.cc b/webkit/tools/test_shell/node_leak_test.cc
index ec5257b..32548c7 100644
--- a/webkit/tools/test_shell/node_leak_test.cc
+++ b/webkit/tools/test_shell/node_leak_test.cc
@@ -36,6 +36,8 @@ class NodeLeakTest : public TestShellTest {
parsed_command_line.GetSwitchValue(test_shell::kJavaScriptFlags);
CommandLine::AppendSwitch(&js_flags, L"expose-gc");
webkit_glue::SetJavaScriptFlags(js_flags);
+ // Expose GCController to JavaScript as well.
+ webkit_glue::SetShouldExposeGCController(true);
std::wstring cache_path =
parsed_command_line.GetSwitchValue(test_shell::kCacheDir);