Index: src/v8threads.cc |
diff --git a/src/v8threads.cc b/src/v8threads.cc |
index c1f20b1971122290d4911f97108e5b70e1f7cf5d..33b620d8eabe29252e17d4e6491a2251d1e2febb 100644 |
--- a/src/v8threads.cc |
+++ b/src/v8threads.cc |
@@ -144,12 +144,13 @@ Unlocker::~Unlocker() { |
void Locker::StartPreemption(int every_n_ms) { |
- v8::internal::ContextSwitcher::StartPreemption(every_n_ms); |
+ v8::internal::ContextSwitcher::StartPreemption( |
+ i::Isolate::Current(), every_n_ms); |
Sven Panne
2013/09/03 11:38:56
Hmmm, we'll have to think about these: The Locker
|
} |
void Locker::StopPreemption() { |
- v8::internal::ContextSwitcher::StopPreemption(); |
+ v8::internal::ContextSwitcher::StopPreemption(i::Isolate::Current()); |
} |
@@ -437,8 +438,7 @@ ContextSwitcher::ContextSwitcher(Isolate* isolate, int every_n_ms) |
// Set the scheduling interval of V8 threads. This function starts the |
// ContextSwitcher thread if needed. |
-void ContextSwitcher::StartPreemption(int every_n_ms) { |
- Isolate* isolate = Isolate::Current(); |
+void ContextSwitcher::StartPreemption(Isolate* isolate, int every_n_ms) { |
ASSERT(Locker::IsLocked(reinterpret_cast<v8::Isolate*>(isolate))); |
if (isolate->context_switcher() == NULL) { |
// If the ContextSwitcher thread is not running at the moment start it now. |
@@ -454,8 +454,7 @@ void ContextSwitcher::StartPreemption(int every_n_ms) { |
// Disable preemption of V8 threads. If multiple threads want to use V8 they |
// must cooperatively schedule amongst them from this point on. |
-void ContextSwitcher::StopPreemption() { |
- Isolate* isolate = Isolate::Current(); |
+void ContextSwitcher::StopPreemption(Isolate* isolate) { |
ASSERT(Locker::IsLocked(reinterpret_cast<v8::Isolate*>(isolate))); |
if (isolate->context_switcher() != NULL) { |
// The ContextSwitcher thread is running. We need to stop it and release |