Revision: 14730
Author:   [email protected]
Date:     Tue May 21 05:03:49 2013
Log: Make sure we register extensions only once. Removed unused member variable.

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.

[email protected]

Review URL: https://codereview.chromium.org/15564002
http://code.google.com/p/v8/source/detail?r=14730

Modified:
 /branches/bleeding_edge/src/api.h
 /branches/bleeding_edge/src/bootstrapper.cc
 /branches/bleeding_edge/src/bootstrapper.h
 /branches/bleeding_edge/src/v8.cc

=======================================
--- /branches/bleeding_edge/src/api.h   Thu May  2 13:18:42 2013
+++ /branches/bleeding_edge/src/api.h   Tue May 21 05:03:49 2013
@@ -149,12 +149,10 @@
   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_;
 };

=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Wed May 15 08:23:53 2013
+++ /branches/bleeding_edge/src/bootstrapper.cc Tue May 21 05:03:49 2013
@@ -95,6 +95,10 @@

 void Bootstrapper::Initialize(bool create_heap_objects) {
   extensions_cache_.Initialize(create_heap_objects);
+}
+
+
+void Bootstrapper::InitializeOncePerProcess() {
   GCExtension::Register();
   ExternalizeStringExtension::Register();
   StatisticsExtension::Register();
=======================================
--- /branches/bleeding_edge/src/bootstrapper.h  Fri Feb 15 01:27:10 2013
+++ /branches/bleeding_edge/src/bootstrapper.h  Tue May 21 05:03:49 2013
@@ -88,6 +88,8 @@
 // context.
 class Bootstrapper {
  public:
+  static void InitializeOncePerProcess();
+
   // Requires: Heap::SetUp has been called.
   void Initialize(bool create_heap_objects);
   void TearDown();
=======================================
--- /branches/bleeding_edge/src/v8.cc   Wed Apr 17 00:20:24 2013
+++ /branches/bleeding_edge/src/v8.cc   Tue May 21 05:03:49 2013
@@ -281,6 +281,7 @@
   LOperand::SetUpCaches();
   SetUpJSCallerSavedCodeData();
   ExternalReference::SetUp();
+  Bootstrapper::InitializeOncePerProcess();
 }

 void V8::InitializeOncePerProcess() {

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to