Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: src/isolate.h

Issue 25697002: Revert "lazy instantiation of the default isolate" and "build fix for 17049". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 6a4c72a1d8dc38365a0bb57588b1ff6bc465c8a0..6693b578f5aaaffe5396d9550a3627a4d1853234 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -491,17 +491,14 @@ class Isolate {
static void GlobalTearDown();
- bool IsDefaultIsolate() const { return is_default_isolate_; }
+ bool IsDefaultIsolate() const { return this == default_isolate_; }
static void SetCrashIfDefaultIsolateInitialized();
// Ensures that process-wide resources and the default isolate have been
// allocated. It is only necessary to call this method in rare cases, for
// example if you are using V8 from within the body of a static initializer.
// Safe to call multiple times.
- static Isolate* EnsureDefaultIsolate(bool must_be_null = false);
-
- // Initialize all thread local variables
- static void InitializeThreadLocalStorage();
+ static void EnsureDefaultIsolate();
// Find the PerThread for this particular (isolate, thread) combination
// If one does not yet exist, return null.
@@ -1140,12 +1137,8 @@ class Isolate {
// Given an address occupied by a live code object, return that object.
Object* FindCodeObject(Address a);
- static Atomic32 GetLivingIsolates() {
- return Acquire_Load(&living_isolates_);
- }
-
private:
- explicit Isolate(bool is_default_isolate = false);
+ Isolate();
friend struct GlobalState;
friend struct InitializeGlobalState;
@@ -1210,11 +1203,11 @@ class Isolate {
static Thread::LocalStorageKey per_isolate_thread_data_key_;
static Thread::LocalStorageKey isolate_key_;
static Thread::LocalStorageKey thread_id_key_;
+ static Isolate* default_isolate_;
static ThreadDataTable* thread_data_table_;
// A global counter for all generated Isolates, might overflow.
static Atomic32 isolate_counter_;
- static Atomic32 living_isolates_;
void Deinit();
@@ -1326,9 +1319,6 @@ class Isolate {
// True if this isolate was initialized from a snapshot.
bool initialized_from_snapshot_;
- // True only for the default isolate.
- bool is_default_isolate_;
-
// Time stamp at initialization.
double time_millis_at_init_;
« no previous file with comments | « src/api.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698