Index: src/v8threads.cc |
diff --git a/src/v8threads.cc b/src/v8threads.cc |
index 94a5e8051da9d1a28ab7193cd4f8df7e4e6c69c6..cc4f43965f3528e8272e4ac85beaa5f527f9060f 100644 |
--- a/src/v8threads.cc |
+++ b/src/v8threads.cc |
@@ -42,11 +42,6 @@ namespace v8 { |
bool Locker::active_ = false; |
-Locker::Locker() { |
- Initialize(i::Isolate::GetDefaultIsolateForLocking()); |
-} |
- |
- |
// Once the Locker is initialized, the current thread will be guaranteed to have |
// the lock for a given isolate. |
void Locker::Initialize(v8::Isolate* isolate) { |
@@ -116,11 +111,6 @@ Locker::~Locker() { |
} |
-Unlocker::Unlocker() { |
- Initialize(i::Isolate::GetDefaultIsolateForLocking()); |
-} |
- |
- |
void Unlocker::Initialize(v8::Isolate* isolate) { |
ASSERT(isolate != NULL); |
isolate_ = reinterpret_cast<i::Isolate*>(isolate); |
@@ -143,14 +133,15 @@ Unlocker::~Unlocker() { |
} |
-void Locker::StartPreemption(int every_n_ms) { |
+void Locker::StartPreemption(v8::Isolate* isolate, int every_n_ms) { |
v8::internal::ContextSwitcher::StartPreemption( |
- i::Isolate::Current(), every_n_ms); |
+ reinterpret_cast<i::Isolate*>(isolate), every_n_ms); |
} |
-void Locker::StopPreemption() { |
- v8::internal::ContextSwitcher::StopPreemption(i::Isolate::Current()); |
+void Locker::StopPreemption(v8::Isolate* isolate) { |
+ v8::internal::ContextSwitcher::StopPreemption( |
+ reinterpret_cast<i::Isolate*>(isolate)); |
} |