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

Unified Diff: test/cctest/test-thread-termination.cc

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 5 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 | « test/cctest/test-sockets.cc ('k') | test/cctest/test-threads.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-thread-termination.cc
===================================================================
--- test/cctest/test-thread-termination.cc (revision 8618)
+++ test/cctest/test-thread-termination.cc (working copy)
@@ -161,12 +161,16 @@
class TerminatorThread : public v8::internal::Thread {
public:
explicit TerminatorThread(i::Isolate* isolate)
- : Thread(isolate, "TerminatorThread") { }
+ : Thread("TerminatorThread"),
+ isolate_(reinterpret_cast<v8::Isolate*>(isolate)) { }
void Run() {
semaphore->Wait();
- CHECK(!v8::V8::IsExecutionTerminating());
- v8::V8::TerminateExecution();
+ CHECK(!v8::V8::IsExecutionTerminating(isolate_));
+ v8::V8::TerminateExecution(isolate_);
}
+
+ private:
+ v8::Isolate* isolate_;
};
@@ -196,8 +200,7 @@
class LoopingThread : public v8::internal::Thread {
public:
- explicit LoopingThread(i::Isolate* isolate)
- : Thread(isolate, "LoopingThread") { }
+ LoopingThread() : Thread("LoopingThread") { }
void Run() {
v8::Locker locker;
v8::HandleScope scope;
@@ -233,7 +236,7 @@
const int kThreads = 2;
i::List<LoopingThread*> threads(kThreads);
for (int i = 0; i < kThreads; i++) {
- threads.Add(new LoopingThread(i::Isolate::Current()));
+ threads.Add(new LoopingThread());
}
for (int i = 0; i < kThreads; i++) {
threads[i]->Start();
« no previous file with comments | « test/cctest/test-sockets.cc ('k') | test/cctest/test-threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698