1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "webkit/support/gc_extension.h"
7 #include "v8/include/v8.h"
9 const char kGCExtensionName
[] = "v8/GCController";
11 namespace extensions_v8
{
14 v8::Extension
* GCExtension::Get() {
15 v8::Extension
* extension
= new v8::Extension(
19 " if (gc) v8_gc = gc;"
20 " GCController = new Object();"
21 " GCController.collect ="
22 " function() {if (v8_gc) v8_gc(); };"
27 } // namespace extensions_v8