: 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.
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;
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;
void V8::SetFatalError() {
- is_running_ = false;
has_fatal_error_ = true;
}
RegisteredExtension::UnregisterAll();
Isolate::GlobalTearDown();
- is_running_ = false;
has_been_disposed_ = true;
delete call_completed_callbacks_;
// 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.
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
// 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;