Index: test/cctest/test-debug.cc |
=================================================================== |
--- test/cctest/test-debug.cc (revision 15486) |
+++ test/cctest/test-debug.cc (working copy) |
@@ -820,6 +820,8 @@ |
const char* expr; // An expression to evaluate when a break point is hit. |
v8::Handle<v8::Value> expected; // The expected result. |
}; |
+ |
+ |
// Array of checks to do. |
struct EvaluateCheck* checks = NULL; |
// Source for The JavaScript function which can do the evaluation when a break |
@@ -1393,6 +1395,7 @@ |
} |
} |
+ |
// Test GC during break point processing. |
TEST(GCDuringBreakPointProcessing) { |
break_point_hit_count = 0; |
@@ -2526,6 +2529,7 @@ |
if (eventDetails.GetEvent() == v8::Break) ++debugEventCount; |
} |
+ |
// Test that the conditional breakpoints work event if code generation from |
// strings is prohibited in the debugee context. |
TEST(ConditionalBreakpointWithCodeGenerationDisallowed) { |
@@ -2571,6 +2575,7 @@ |
} |
} |
+ |
// Test that the evaluation of expressions when a break point is hit generates |
// the correct results in case code generation from strings is disallowed in the |
// debugee context. |
@@ -2625,6 +2630,7 @@ |
return i; |
} |
+ |
// Copies a 16-bit string to a C string by dropping the high byte of |
// each character. Does not check for buffer overflow. |
// Can be used in any thread. Requires string length as an input. |
@@ -2712,6 +2718,7 @@ |
} |
} |
+ |
// Test that the evaluation of expressions works even from ProcessDebugMessages |
// i.e. with empty stack. |
TEST(DebugEvaluateWithoutStack) { |
@@ -4265,6 +4272,7 @@ |
CheckDebuggerUnloaded(); |
} |
+ |
static void NamedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) { |
v8::Handle<v8::Array> result = v8::Array::New(3); |
result->Set(v8::Integer::New(0), v8::String::New("a")); |
@@ -4709,6 +4717,7 @@ |
invalid_ = false; // A barrier may only be used once. Then it is invalid. |
} |
+ |
// Do not call, due to race condition with Wait(). |
// Could be resolved with Pthread condition variables. |
ThreadBarrier::~ThreadBarrier() { |
@@ -4717,6 +4726,7 @@ |
delete sem_; |
} |
+ |
void ThreadBarrier::Wait() { |
lock_->Lock(); |
CHECK(!invalid_); |
@@ -4736,6 +4746,7 @@ |
} |
} |
+ |
// A set containing enough barriers and semaphores for any of the tests. |
class Barriers { |
public: |
@@ -4845,6 +4856,7 @@ |
return res; |
} |
+ |
/* Test MessageQueues */ |
/* Tests the message queues that hold debugger commands and |
* response messages to the debugger. Fills queues and makes |
@@ -4876,6 +4888,7 @@ |
message_queue_barriers.semaphore_1->Wait(); |
} |
+ |
void MessageQueueDebuggerThread::Run() { |
const int kBufferSize = 1000; |
uint16_t buffer_1[kBufferSize]; |
@@ -5175,6 +5188,7 @@ |
CompileRun(source); |
} |
+ |
void DebuggerThread::Run() { |
const int kBufSize = 1000; |
uint16_t buffer[kBufSize]; |
@@ -5209,6 +5223,7 @@ |
debugger_thread.Join(); |
} |
+ |
/* Test RecursiveBreakpoints */ |
/* In this test, the debugger evaluates a function with a breakpoint, after |
* hitting a breakpoint in another function. We do this with both values |
@@ -5400,6 +5415,7 @@ |
v8::Debug::SendCommand(buffer, AsciiToUtf16(command_8, buffer)); |
} |
+ |
void TestRecursiveBreakpointsGeneric(bool global_evaluate) { |
i::FLAG_debugger_auto_break = true; |
@@ -5418,10 +5434,12 @@ |
breakpoints_debugger_thread.Join(); |
} |
+ |
TEST(RecursiveBreakpoints) { |
TestRecursiveBreakpointsGeneric(false); |
} |
+ |
TEST(RecursiveBreakpointsGlobal) { |
TestRecursiveBreakpointsGeneric(true); |
} |
@@ -6873,6 +6891,7 @@ |
counting_message_handler_counter++; |
} |
+ |
// Test that debug messages get processed when ProcessDebugMessages is called. |
TEST(ProcessDebugMessages) { |
DebugLocalContext env; |
@@ -7112,6 +7131,7 @@ |
CHECK_EQ(expected_callback_data, details.GetCallbackData()); |
} |
+ |
// Check that event details contain context where debug event occured. |
TEST(DebugEventContext) { |
v8::Isolate* isolate = v8::Isolate::GetCurrent(); |