V8::Initialize() can be called from various threads simultaneously, so
everything should be done only once per process or within the Isolate. For
registering extensions, we do the former now.
R=dslomov@chromium.org
Review URL: https://codereview.chromium.org/
15564002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14730
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
static void UnregisterAll();
Extension* extension() { return extension_; }
RegisteredExtension* next() { return next_; }
- RegisteredExtension* next_auto() { return next_auto_; }
static RegisteredExtension* first_extension() { return first_extension_; }
private:
Extension* extension_;
RegisteredExtension* next_;
- RegisteredExtension* next_auto_;
static RegisteredExtension* first_extension_;
};
void Bootstrapper::Initialize(bool create_heap_objects) {
extensions_cache_.Initialize(create_heap_objects);
+}
+
+
+void Bootstrapper::InitializeOncePerProcess() {
GCExtension::Register();
ExternalizeStringExtension::Register();
StatisticsExtension::Register();
// context.
class Bootstrapper {
public:
+ static void InitializeOncePerProcess();
+
// Requires: Heap::SetUp has been called.
void Initialize(bool create_heap_objects);
void TearDown();
LOperand::SetUpCaches();
SetUpJSCallerSavedCodeData();
ExternalReference::SetUp();
+ Bootstrapper::InitializeOncePerProcess();
}
void V8::InitializeOncePerProcess() {