Chromium Code Reviews| Index: src/isolate.h |
| diff --git a/src/isolate.h b/src/isolate.h |
| index f1c9b3ccfaae7843cfb1be0357ce056d105a6fb3..d83950c084b2cf793620f516983899a81832e0b8 100644 |
| --- a/src/isolate.h |
| +++ b/src/isolate.h |
| @@ -1032,6 +1032,8 @@ class Isolate { |
| date_cache_ = date_cache; |
| } |
| + bool to_delete() { return to_delete_; } |
| + |
| private: |
| Isolate(); |
| @@ -1128,7 +1130,10 @@ class Isolate { |
| // for the thread. |
| // Not thread-safe. Multiple threads should not Enter/Exit the same isolate |
| // at the same time, this should be prevented using external locking. |
| - void Exit(); |
| + // When using --concurrent_crankshaft, the Entry and Exit methods |
| + // need to automatically lock and unlock the isolate, except in one |
| + // edge-case, when we call Exit(false) |
|
danno
2012/05/22 10:32:19
Can you be more explicit why this case happens?
|
| + void Exit(bool auto_unlock = true); |
| void PreallocatedMemoryThreadStart(); |
| void PreallocatedMemoryThreadStop(); |
| @@ -1215,6 +1220,12 @@ class Isolate { |
| // Time stamp at initialization. |
| double time_millis_at_init_; |
| + // The crankshaft thread should delete this isolate when it sees it |
| + // next (and also not compile anything in it). |
| + bool to_delete_; |
| + |
| + List<bool> lock_history_; |
| + |
| #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ |
| defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) |
| bool simulator_initialized_; |
| @@ -1255,6 +1266,7 @@ class Isolate { |
| #undef ISOLATE_FIELD_OFFSET |
| #endif |
| + friend class CrankshaftThread; |
| friend class ExecutionAccess; |
| friend class IsolateInitializer; |
| friend class ThreadManager; |