| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2008 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. | |
| 4 | |
| 5 #include "config.h" | |
| 6 #include "GCController.h" | |
| 7 | |
| 8 namespace WebCore { | |
| 9 | |
| 10 const char* kGCExtensionName = "v8/GCController"; | |
| 11 | |
| 12 v8::Extension* GCExtension::Get() { | |
| 13 v8::Extension* extension = new v8::Extension( | |
| 14 kGCExtensionName, | |
| 15 "(function () {" | |
| 16 " var v8_gc;" | |
| 17 " if (gc) v8_gc = gc;" | |
| 18 " GCController = new Object();" | |
| 19 " GCController.collect =" | |
| 20 " function() {if (v8_gc) v8_gc(); };" | |
| 21 " })()"); | |
| 22 return extension; | |
| 23 } | |
| 24 | |
| 25 } | |
| 26 | |
| OLD | NEW |