Revision: 8255
Author: [email protected]
Date: Fri Jun 10 02:36:18 2011
Log: tests compile but crash
http://code.google.com/p/v8/source/detail?r=8255
Modified:
/branches/bleeding_edge/test/cctest/cctest.h
/branches/bleeding_edge/test/cctest/test-api.cc
/branches/bleeding_edge/test/cctest/test-circular-queue.cc
/branches/bleeding_edge/test/cctest/test-cpu-profiler.cc
/branches/bleeding_edge/test/cctest/test-debug.cc
/branches/bleeding_edge/test/cctest/test-lockers.cc
/branches/bleeding_edge/test/cctest/test-platform-tls.cc
/branches/bleeding_edge/test/cctest/test-sockets.cc
/branches/bleeding_edge/test/cctest/test-thread-termination.cc
/branches/bleeding_edge/test/cctest/test-threads.cc
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.h Fri May 6 02:22:54 2011
+++ /branches/bleeding_edge/test/cctest/cctest.h Fri Jun 10 02:36:18 2011
@@ -87,8 +87,8 @@
class ApiTestFuzzer: public v8::internal::Thread {
public:
void CallTest();
- explicit ApiTestFuzzer(v8::internal::Isolate* isolate, int num)
- : Thread(isolate, "ApiTestFuzzer"),
+ explicit ApiTestFuzzer(int num)
+ : Thread("ApiTestFuzzer"),
test_number_(num),
gate_(v8::internal::OS::CreateSemaphore(0)),
active_(true) {
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Tue Jun 7 00:17:46 2011
+++ /branches/bleeding_edge/test/cctest/test-api.cc Fri Jun 10 02:36:18 2011
@@ -9342,8 +9342,7 @@
int end = (count * (part + 1) / (LAST_PART + 1)) - 1;
active_tests_ = tests_being_run_ = end - start + 1;
for (int i = 0; i < tests_being_run_; i++) {
- RegisterThreadedTest::nth(i)->fuzzer_ = new ApiTestFuzzer(
- i::Isolate::Current(), i + start);
+ RegisterThreadedTest::nth(i)->fuzzer_ = new ApiTestFuzzer(i + start);
}
for (int i = 0; i < active_tests_; i++) {
RegisterThreadedTest::nth(i)->fuzzer_->Start();
@@ -10459,7 +10458,7 @@
gc_during_regexp_ = 0;
regexp_success_ = false;
gc_success_ = false;
- GCThread gc_thread(i::Isolate::Current(), this);
+ GCThread gc_thread(this);
gc_thread.Start();
v8::Locker::StartPreemption(1);
@@ -10479,8 +10478,8 @@
class GCThread : public i::Thread {
public:
- explicit GCThread(i::Isolate* isolate, RegExpInterruptTest* test)
- : Thread(isolate, "GCThread"), test_(test) {}
+ GCThread(RegExpInterruptTest* test)
+ : Thread("GCThread"), test_(test) {}
virtual void Run() {
test_->CollectGarbage();
}
@@ -10582,7 +10581,7 @@
gc_during_apply_ = 0;
apply_success_ = false;
gc_success_ = false;
- GCThread gc_thread(i::Isolate::Current(), this);
+ GCThread gc_thread(this);
gc_thread.Start();
v8::Locker::StartPreemption(1);
@@ -10602,8 +10601,8 @@
class GCThread : public i::Thread {
public:
- explicit GCThread(i::Isolate* isolate, ApplyInterruptTest* test)
- : Thread(isolate, "GCThread"), test_(test) {}
+ explicit GCThread(ApplyInterruptTest* test)
+ : Thread("GCThread"), test_(test) {}
virtual void Run() {
test_->CollectGarbage();
}
@@ -10877,7 +10876,7 @@
NONE,
i::kNonStrictMode)->ToObjectChecked();
- MorphThread morph_thread(i::Isolate::Current(), this);
+ MorphThread morph_thread(this);
morph_thread.Start();
v8::Locker::StartPreemption(1);
LongRunningRegExp();
@@ -10897,9 +10896,8 @@
class MorphThread : public i::Thread {
public:
- explicit MorphThread(i::Isolate* isolate,
- RegExpStringModificationTest* test)
- : Thread(isolate, "MorphThread"), test_(test) {}
+ explicit MorphThread(RegExpStringModificationTest* test)
+ : Thread("MorphThread"), test_(test) {}
virtual void Run() {
test_->MorphString();
}
@@ -13716,8 +13714,8 @@
class IsolateThread : public v8::internal::Thread {
public:
- explicit IsolateThread(v8::Isolate* isolate, int fib_limit)
- : Thread(NULL, "IsolateThread"),
+ IsolateThread(v8::Isolate* isolate, int fib_limit)
+ : Thread("IsolateThread"),
isolate_(isolate),
fib_limit_(fib_limit),
result_(0) { }
@@ -13797,7 +13795,7 @@
};
explicit InitDefaultIsolateThread(TestCase testCase)
- : Thread(NULL, "InitDefaultIsolateThread"),
+ : Thread("InitDefaultIsolateThread"),
testCase_(testCase),
result_(false) { }
=======================================
--- /branches/bleeding_edge/test/cctest/test-circular-queue.cc Mon Mar 21
08:04:17 2011
+++ /branches/bleeding_edge/test/cctest/test-circular-queue.cc Fri Jun 10
02:36:18 2011
@@ -84,12 +84,11 @@
public:
typedef SamplingCircularQueue::Cell Record;
- ProducerThread(i::Isolate* isolate,
- SamplingCircularQueue* scq,
+ ProducerThread(SamplingCircularQueue* scq,
int records_per_chunk,
Record value,
i::Semaphore* finished)
- : Thread(isolate, "producer"),
+ : Thread("producer"),
scq_(scq),
records_per_chunk_(records_per_chunk),
value_(value),
@@ -133,10 +132,9 @@
// Check that we are using non-reserved values.
CHECK_NE(SamplingCircularQueue::kClear, 1);
CHECK_NE(SamplingCircularQueue::kEnd, 1);
- i::Isolate* isolate = i::Isolate::Current();
- ProducerThread producer1(isolate, &scq, kRecordsPerChunk, 1, semaphore);
- ProducerThread producer2(isolate, &scq, kRecordsPerChunk, 10, semaphore);
- ProducerThread producer3(isolate, &scq, kRecordsPerChunk, 20, semaphore);
+ ProducerThread producer1(&scq, kRecordsPerChunk, 1, semaphore);
+ ProducerThread producer2(&scq, kRecordsPerChunk, 10, semaphore);
+ ProducerThread producer3(&scq, kRecordsPerChunk, 20, semaphore);
CHECK_EQ(NULL, scq.StartDequeue());
producer1.Start();
=======================================
--- /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Fri May 20
08:11:00 2011
+++ /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Fri Jun 10
02:36:18 2011
@@ -24,7 +24,7 @@
TEST(StartStop) {
CpuProfilesCollection profiles;
ProfileGenerator generator(&profiles);
- ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
+ ProfilerEventsProcessor processor(&generator);
processor.Start();
processor.Stop();
processor.Join();
@@ -85,7 +85,7 @@
CpuProfilesCollection profiles;
profiles.StartProfiling("", 1);
ProfileGenerator generator(&profiles);
- ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
+ ProfilerEventsProcessor processor(&generator);
processor.Start();
// Enqueue code creation events.
@@ -146,7 +146,7 @@
CpuProfilesCollection profiles;
profiles.StartProfiling("", 1);
ProfileGenerator generator(&profiles);
- ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
+ ProfilerEventsProcessor processor(&generator);
processor.Start();
processor.CodeCreateEvent(i::Logger::BUILTIN_TAG,
@@ -236,7 +236,7 @@
CpuProfilesCollection profiles;
profiles.StartProfiling("", 1);
ProfileGenerator generator(&profiles);
- ProfilerEventsProcessor processor(i::Isolate::Current(), &generator);
+ ProfilerEventsProcessor processor(&generator);
processor.Start();
processor.CodeCreateEvent(i::Logger::BUILTIN_TAG,
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Mon May 16 09:33:58
2011
+++ /branches/bleeding_edge/test/cctest/test-debug.cc Fri Jun 10 02:36:18
2011
@@ -4728,8 +4728,8 @@
// placing JSON debugger commands in the queue.
class MessageQueueDebuggerThread : public v8::internal::Thread {
public:
- explicit MessageQueueDebuggerThread(v8::internal::Isolate* isolate)
- : Thread(isolate, "MessageQueueDebuggerThread") { }
+ MessageQueueDebuggerThread()
+ : Thread("MessageQueueDebuggerThread") { }
void Run();
};
@@ -4832,8 +4832,7 @@
// This thread runs the v8 engine.
TEST(MessageQueues) {
- MessageQueueDebuggerThread message_queue_debugger_thread(
- i::Isolate::Current());
+ MessageQueueDebuggerThread message_queue_debugger_thread;
// Create a V8 environment
v8::HandleScope scope;
@@ -4980,15 +4979,13 @@
class V8Thread : public v8::internal::Thread {
public:
- explicit V8Thread(v8::internal::Isolate* isolate)
- : Thread(isolate, "V8Thread") { }
+ V8Thread() : Thread("V8Thread") { }
void Run();
};
class DebuggerThread : public v8::internal::Thread {
public:
- explicit DebuggerThread(v8::internal::Isolate* isolate)
- : Thread(isolate, "DebuggerThread") { }
+ DebuggerThread() : Thread("DebuggerThread") { }
void Run();
};
@@ -5065,8 +5062,8 @@
TEST(ThreadedDebugging) {
- DebuggerThread debugger_thread(i::Isolate::Current());
- V8Thread v8_thread(i::Isolate::Current());
+ DebuggerThread debugger_thread;
+ V8Thread v8_thread;
// Create a V8 environment
threaded_debugging_barriers.Initialize();
@@ -5087,16 +5084,14 @@
class BreakpointsV8Thread : public v8::internal::Thread {
public:
- explicit BreakpointsV8Thread(v8::internal::Isolate* isolate)
- : Thread(isolate, "BreakpointsV8Thread") { }
+ BreakpointsV8Thread() : Thread("BreakpointsV8Thread") { }
void Run();
};
class BreakpointsDebuggerThread : public v8::internal::Thread {
public:
- explicit BreakpointsDebuggerThread(v8::internal::Isolate* isolate,
- bool global_evaluate)
- : Thread(isolate, "BreakpointsDebuggerThread"),
+ explicit BreakpointsDebuggerThread(bool global_evaluate)
+ : Thread("BreakpointsDebuggerThread"),
global_evaluate_(global_evaluate) {}
void Run();
@@ -5273,9 +5268,8 @@
void TestRecursiveBreakpointsGeneric(bool global_evaluate) {
i::FLAG_debugger_auto_break = true;
- BreakpointsDebuggerThread
breakpoints_debugger_thread(i::Isolate::Current(),
- global_evaluate);
- BreakpointsV8Thread breakpoints_v8_thread(i::Isolate::Current());
+ BreakpointsDebuggerThread breakpoints_debugger_thread(global_evaluate);
+ BreakpointsV8Thread breakpoints_v8_thread;
// Create a V8 environment
Barriers stack_allocated_breakpoints_barriers;
@@ -5657,15 +5651,13 @@
class HostDispatchV8Thread : public v8::internal::Thread {
public:
- explicit HostDispatchV8Thread(v8::internal::Isolate* isolate)
- : Thread(isolate, "HostDispatchV8Thread") { }
+ HostDispatchV8Thread() : Thread("HostDispatchV8Thread") { }
void Run();
};
class HostDispatchDebuggerThread : public v8::internal::Thread {
public:
- explicit HostDispatchDebuggerThread(v8::internal::Isolate* isolate)
- : Thread(isolate, "HostDispatchDebuggerThread") { }
+ HostDispatchDebuggerThread() : Thread("HostDispatchDebuggerThread") { }
void Run();
};
@@ -5737,9 +5729,8 @@
TEST(DebuggerHostDispatch) {
- HostDispatchDebuggerThread host_dispatch_debugger_thread(
- i::Isolate::Current());
- HostDispatchV8Thread host_dispatch_v8_thread(i::Isolate::Current());
+ HostDispatchDebuggerThread host_dispatch_debugger_thread;
+ HostDispatchV8Thread host_dispatch_v8_thread;
i::FLAG_debugger_auto_break = true;
// Create a V8 environment
@@ -5763,15 +5754,14 @@
class DebugMessageDispatchV8Thread : public v8::internal::Thread {
public:
- explicit DebugMessageDispatchV8Thread(v8::internal::Isolate* isolate)
- : Thread(isolate, "DebugMessageDispatchV8Thread") { }
+ DebugMessageDispatchV8Thread() : Thread("DebugMessageDispatchV8Thread")
{ }
void Run();
};
class DebugMessageDispatchDebuggerThread : public v8::internal::Thread {
public:
- explicit DebugMessageDispatchDebuggerThread(v8::internal::Isolate*
isolate)
- : Thread(isolate, "DebugMessageDispatchDebuggerThread") { }
+ DebugMessageDispatchDebuggerThread()
+ : Thread("DebugMessageDispatchDebuggerThread") { }
void Run();
};
@@ -5805,10 +5795,8 @@
TEST(DebuggerDebugMessageDispatch) {
- DebugMessageDispatchDebuggerThread
debug_message_dispatch_debugger_thread(
- i::Isolate::Current());
- DebugMessageDispatchV8Thread debug_message_dispatch_v8_thread(
- i::Isolate::Current());
+ DebugMessageDispatchDebuggerThread
debug_message_dispatch_debugger_thread;
+ DebugMessageDispatchV8Thread debug_message_dispatch_v8_thread;
i::FLAG_debugger_auto_break = true;
@@ -5873,8 +5861,8 @@
class DebuggerAgentProtocolServerThread : public i::Thread {
public:
- explicit DebuggerAgentProtocolServerThread(i::Isolate* isolate, int port)
- : Thread(isolate, "DebuggerAgentProtocolServerThread"),
+ explicit DebuggerAgentProtocolServerThread(int port)
+ : Thread("DebuggerAgentProtocolServerThread"),
port_(port),
server_(NULL),
client_(NULL),
@@ -5939,7 +5927,7 @@
// Create a socket server to receive a debugger agent message.
DebuggerAgentProtocolServerThread* server =
- new DebuggerAgentProtocolServerThread(i::Isolate::Current(), kPort);
+ new DebuggerAgentProtocolServerThread(kPort);
server->Start();
server->WaitForListening();
=======================================
--- /branches/bleeding_edge/test/cctest/test-lockers.cc Tue Jun 7 11:33:03
2011
+++ /branches/bleeding_edge/test/cctest/test-lockers.cc Fri Jun 10 02:36:18
2011
@@ -64,7 +64,7 @@
public:
KangarooThread(v8::Isolate* isolate,
v8::Handle<v8::Context> context, int value)
- : Thread(NULL, "KangarooThread"),
+ : Thread("KangarooThread"),
isolate_(isolate), context_(context), value_(value) {
}
@@ -149,8 +149,8 @@
private:
class ThreadWithSemaphore : public i::Thread {
public:
- explicit ThreadWithSemaphore(JoinableThread* joinable_thread)
- : Thread(NULL, joinable_thread->name_),
+ ThreadWithSemaphore(JoinableThread* joinable_thread)
+ : Thread(joinable_thread->name_),
joinable_thread_(joinable_thread) {
}
=======================================
--- /branches/bleeding_edge/test/cctest/test-platform-tls.cc Sun Mar 27
09:14:20 2011
+++ /branches/bleeding_edge/test/cctest/test-platform-tls.cc Fri Jun 10
02:36:18 2011
@@ -48,7 +48,7 @@
class TestThread : public Thread {
public:
- TestThread() : Thread(NULL, "TestThread") {}
+ TestThread() : Thread("TestThread") {}
virtual void Run() {
DoTest();
=======================================
--- /branches/bleeding_edge/test/cctest/test-sockets.cc Mon Mar 21 08:04:17
2011
+++ /branches/bleeding_edge/test/cctest/test-sockets.cc Fri Jun 10 02:36:18
2011
@@ -10,8 +10,8 @@
class SocketListenerThread : public Thread {
public:
- explicit SocketListenerThread(Isolate* isolate, int port, int data_size)
- : Thread(isolate, "SocketListenerThread"),
+ SocketListenerThread(int port, int data_size)
+ : Thread("SocketListenerThread"),
port_(port),
data_size_(data_size),
server_(NULL),
@@ -92,8 +92,7 @@
OS::SNPrintF(Vector<char>(port_str, kPortBuferLen), "%d", port);
// Create a socket listener.
- SocketListenerThread* listener = new
SocketListenerThread(Isolate::Current(),
- port, len);
+ SocketListenerThread* listener = new SocketListenerThread(port, len);
listener->Start();
listener->WaitForListening();
=======================================
--- /branches/bleeding_edge/test/cctest/test-thread-termination.cc Thu May
5 11:55:31 2011
+++ /branches/bleeding_edge/test/cctest/test-thread-termination.cc Fri Jun
10 02:36:18 2011
@@ -160,8 +160,7 @@
class TerminatorThread : public v8::internal::Thread {
public:
- explicit TerminatorThread(i::Isolate* isolate)
- : Thread(isolate, "TerminatorThread") { }
+ TerminatorThread() : Thread("TerminatorThread") { }
void Run() {
semaphore->Wait();
CHECK(!v8::V8::IsExecutionTerminating());
@@ -174,7 +173,7 @@
// from the side by another thread.
TEST(TerminateOnlyV8ThreadFromOtherThread) {
semaphore = v8::internal::OS::CreateSemaphore(0);
- TerminatorThread thread(i::Isolate::Current());
+ TerminatorThread thread;
thread.Start();
v8::HandleScope scope;
@@ -196,8 +195,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 +231,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();
=======================================
--- /branches/bleeding_edge/test/cctest/test-threads.cc Mon Apr 11 16:46:22
2011
+++ /branches/bleeding_edge/test/cctest/test-threads.cc Fri Jun 10 02:36:18
2011
@@ -65,7 +65,7 @@
class ThreadA: public v8::internal::Thread {
public:
- explicit ThreadA(i::Isolate* isolate) : Thread(isolate, "ThreadA") { }
+ ThreadA() : Thread("ThreadA") { }
void Run() {
v8::Locker locker;
v8::HandleScope scope;
@@ -101,7 +101,7 @@
class ThreadB: public v8::internal::Thread {
public:
- explicit ThreadB(i::Isolate* isolate) : Thread(isolate, "ThreadB") { }
+ ThreadB() : Thread("ThreadB") { }
void Run() {
do {
{
@@ -126,8 +126,8 @@
TEST(JSFunctionResultCachesInTwoThreads) {
v8::V8::Initialize();
- ThreadA threadA(i::Isolate::Current());
- ThreadB threadB(i::Isolate::Current());
+ ThreadA threadA;
+ ThreadB threadB;
threadA.Start();
threadB.Start();
@@ -144,7 +144,7 @@
i::List<i::ThreadId>* refs,
unsigned int thread_no,
i::Semaphore* semaphore)
- : Thread(NULL, "ThreadRefValidationThread"),
+ : Thread("ThreadRefValidationThread"),
refs_(refs), thread_no_(thread_no),
thread_to_start_(thread_to_start),
semaphore_(semaphore) {
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev