diff options
author | fqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 17:29:05 +0000 |
---|---|---|
committer | fqian@google.com <fqian@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 17:29:05 +0000 |
commit | 296d61e24b5a5311f120a767a59ac006176f6f9a (patch) | |
tree | 2b70d0a190ab2719137b274bd63b6fc83ce02bde /webkit/glue/webkit_glue.cc | |
parent | 99b362e5289d111296f72404e7ea1b4cbe7a07cf (diff) | |
download | chromium_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/glue/webkit_glue.cc')
-rw-r--r-- | webkit/glue/webkit_glue.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index a1e7272..335c3b0 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -64,6 +64,13 @@ void SetRecordPlaybackMode(bool value) { #endif } + +void SetShouldExposeGCController(bool enable) { +#if USE(V8) + WebCore::ScriptController::setShouldExposeGCController(enable); +#endif +} + static bool layout_test_mode_ = false; void SetLayoutTestMode(bool enable) { |