Reviewers: Vyacheslav Egorov,
Description:
Fix asserts in StartPreemption and StopPreemption.
Please review this at http://codereview.chromium.org/7054070/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/v8threads.cc
Index: src/v8threads.cc
===================================================================
--- src/v8threads.cc (revision 8172)
+++ src/v8threads.cc (working copy)
@@ -411,7 +411,7 @@
// ContextSwitcher thread if needed.
void ContextSwitcher::StartPreemption(int every_n_ms) {
Isolate* isolate = Isolate::Current();
- ASSERT(Locker::IsLocked());
+ ASSERT(Locker::IsLocked(isolate));
if (isolate->context_switcher() == NULL) {
// If the ContextSwitcher thread is not running at the moment start it
now.
isolate->set_context_switcher(new ContextSwitcher(isolate,
every_n_ms));
@@ -428,7 +428,7 @@
// must cooperatively schedule amongst them from this point on.
void ContextSwitcher::StopPreemption() {
Isolate* isolate = Isolate::Current();
- ASSERT(Locker::IsLocked());
+ ASSERT(Locker::IsLocked(isolate));
if (isolate->context_switcher() != NULL) {
// The ContextSwitcher thread is running. We need to stop it and
release
// its resources.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev