diff options
Diffstat (limited to 'deps/v8/src/extensions/gc-extension.cc')
-rw-r--r-- | deps/v8/src/extensions/gc-extension.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/v8/src/extensions/gc-extension.cc b/deps/v8/src/extensions/gc-extension.cc index f921552aaa..573797e174 100644 --- a/deps/v8/src/extensions/gc-extension.cc +++ b/deps/v8/src/extensions/gc-extension.cc @@ -46,8 +46,9 @@ v8::Handle<v8::Value> GCExtension::GC(const v8::Arguments& args) { void GCExtension::Register() { - static GCExtension gc_extension; - static v8::DeclareExtension declaration(&gc_extension); + static GCExtension* gc_extension = NULL; + if (gc_extension == NULL) gc_extension = new GCExtension(); + static v8::DeclareExtension gc_extension_declaration(gc_extension); } } } // namespace v8::internal |