Reviewers: Yang,

Description:
Remove obsolete global V8::IsRunning() predicate.

R=yang...@chromium.org
BUG=v8:2744

Please review this at https://codereview.chromium.org/23597013/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/bootstrapper.cc
  M src/v8.h
  M src/v8.cc
  M test/cctest/test-log.cc


Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 85c2a7c1f55b15a14195ea311f5e12da7d8fcbbb..ace134b64572a5c2b15932de2247fd99610e62a4 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2588,8 +2588,8 @@ Genesis::Genesis(Isolate* isolate,
     : isolate_(isolate),
       active_(isolate->bootstrapper()) {
   result_ = Handle<Context>::null();
-  // If V8 isn't running and cannot be initialized, just return.
-  if (!V8::IsRunning() && !V8::Initialize(NULL)) return;
+  // If V8 cannot be initialized, just return.
+  if (!V8::Initialize(NULL)) return;

   // Before creating the roots we must save the context and restore it
   // on all function exits.
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index 31d2dd579d66e880dd294b0d45efd8903cb7c701..a9d3c998ead857a07b171039da1f7648888aa71a 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -50,7 +50,6 @@ namespace internal {

 V8_DECLARE_ONCE(init_once);

-bool V8::is_running_ = false;
 bool V8::has_been_set_up_ = false;
 bool V8::has_been_disposed_ = false;
 bool V8::has_fatal_error_ = false;
@@ -84,7 +83,6 @@ bool V8::Initialize(Deserializer* des) {
   Isolate* isolate = Isolate::Current();
   if (isolate->IsInitialized()) return true;

-  is_running_ = true;
   has_been_set_up_ = true;
   has_fatal_error_ = false;
   has_been_disposed_ = false;
@@ -94,7 +92,6 @@ bool V8::Initialize(Deserializer* des) {


 void V8::SetFatalError() {
-  is_running_ = false;
   has_fatal_error_ = true;
 }

@@ -117,7 +114,6 @@ void V8::TearDown() {
   RegisteredExtension::UnregisterAll();
   Isolate::GlobalTearDown();

-  is_running_ = false;
   has_been_disposed_ = true;

   delete call_completed_callbacks_;
Index: src/v8.h
diff --git a/src/v8.h b/src/v8.h
index aee4890aa066a9a949346d522b3106174fba9ae3..abace93f35e57c95344fa9c2aa70d5d440229fdd 100644
--- a/src/v8.h
+++ b/src/v8.h
@@ -82,7 +82,6 @@ class V8 : public AllStatic {
   // empty heap.
   static bool Initialize(Deserializer* des);
   static void TearDown();
-  static bool IsRunning() { return is_running_; }
   // To be dead you have to have lived
   // TODO(isolates): move IsDead to Isolate.
   static bool IsDead() { return has_fatal_error_ || has_been_disposed_; }
@@ -130,8 +129,6 @@ class V8 : public AllStatic {
   static void InitializeOncePerProcessImpl();
   static void InitializeOncePerProcess();

-  // True if engine is currently running
-  static bool is_running_;
   // True if V8 has ever been run
   static bool has_been_set_up_;
   // True if error has been signaled for current engine
Index: test/cctest/test-log.cc
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index 6bf56f0fa40395405586c842d197e4ff56cf508c..daa8178af9ec11a60d7069a9ba4bf76ec42840f9 100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -427,9 +427,6 @@ TEST(EquivalenceOfLoggingAndTraversal) {
// it launches a new cctest instance for every test. To be sure that launching
   // cctest manually also works, please be sure that no tests below
   // are using V8.
-  //
-  // P.S. No, V8 can't be re-initialized after disposal, see include/v8.h.
-  CHECK(!i::V8::IsRunning());

   // Start with profiling to capture all code events from the beginning.
   ScopedLoggerInitializer initialize_logger;


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to