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

Unified Diff: test/cctest/test-log.cc

Issue 669058: Try to fix issue 632 by being more careful in the locking/unlocking... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-log.cc
===================================================================
--- test/cctest/test-log.cc (revision 4014)
+++ test/cctest/test-log.cc (working copy)
@@ -390,21 +390,24 @@
class LoopingJsThread : public LoopingThread {
public:
void RunLoop() {
- {
- v8::Locker locker;
- CHECK(v8::internal::ThreadManager::HasId());
- SetV8ThreadId();
- }
+ v8::Locker locker;
+ CHECK(v8::internal::ThreadManager::HasId());
+ SetV8ThreadId();
while (IsRunning()) {
- v8::Locker locker;
v8::HandleScope scope;
v8::Persistent<v8::Context> context = v8::Context::New();
- v8::Context::Scope context_scope(context);
- SignalRunning();
- CompileAndRunScript(
- "var j; for (var i=0; i<10000; ++i) { j = Math.sin(i); }");
+ CHECK(!context.IsEmpty());
+ {
+ v8::Context::Scope context_scope(context);
+ SignalRunning();
+ CompileAndRunScript(
+ "var j; for (var i=0; i<10000; ++i) { j = Math.sin(i); }");
+ }
context.Dispose();
- i::OS::Sleep(1);
+ {
+ v8::Unlocker unlocker;
+ i::OS::Sleep(1);
+ }
}
}
};
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698