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

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

Issue 7003108: "Deiceolate" Thread classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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
Index: test/cctest/test-thread-termination.cc
diff --git a/test/cctest/test-thread-termination.cc b/test/cctest/test-thread-termination.cc
index 1e8a627c42c0a19ff4722561da783374bde9d5b9..1aa57e3081a5d779addf9fe141b77edc7a9ff623 100644
--- a/test/cctest/test-thread-termination.cc
+++ b/test/cctest/test-thread-termination.cc
@@ -161,12 +161,16 @@ TEST(TerminateOnlyV8ThreadFromThreadItselfNoLoop) {
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 @@ TEST(TerminateOnlyV8ThreadFromOtherThread) {
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 @@ TEST(TerminateMultipleV8ThreadsDefaultIsolate) {
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();

Powered by Google App Engine
This is Rietveld 408576698