Remove obsolete global V8::IsRunning() predicate.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 2 Sep 2013 17:06:08 +0000 (17:06 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 2 Sep 2013 17:06:08 +0000 (17:06 +0000)
R=yangguo@chromium.org
BUG=v8:2744

Review URL: https://codereview.chromium.org/23597013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/bootstrapper.cc
src/v8.cc
src/v8.h
test/cctest/test-log.cc

index 85c2a7c..ace134b 100644 (file)
@@ -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 7d2294e..a5ff145 100644 (file)
--- 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;
@@ -85,7 +84,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;
@@ -95,7 +93,6 @@ bool V8::Initialize(Deserializer* des) {
 
 
 void V8::SetFatalError() {
-  is_running_ = false;
   has_fatal_error_ = true;
 }
 
@@ -118,7 +115,6 @@ void V8::TearDown() {
   RegisteredExtension::UnregisterAll();
   Isolate::GlobalTearDown();
 
-  is_running_ = false;
   has_been_disposed_ = true;
 
   delete call_completed_callbacks_;
index 47893e8..73c9b75 100644 (file)
--- 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_; }
   static bool UseCrankshaft() { return use_crankshaft_; }
   // To be dead you have to have lived
   // TODO(isolates): move IsDead to Isolate.
@@ -131,8 +130,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 8bf306f..f752c36 100644 (file)
@@ -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;