Add signalSyncPoint to the WebGraphicsContext3D command buffer impls.
[chromium-blink-merge.git] / webkit / support / gc_extension.cc
blob44c3e112fc5313db1cbcd3709d0edd7dc5cdab85
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 {
13 // static
14 v8::Extension* GCExtension::Get() {
15 v8::Extension* extension = new v8::Extension(
16 kGCExtensionName,
17 "(function () {"
18 " var v8_gc;"
19 " if (gc) v8_gc = gc;"
20 " GCController = new Object();"
21 " GCController.collect ="
22 " function() {if (v8_gc) v8_gc(); };"
23 " })();");
24 return extension;
27 } // namespace extensions_v8