OLD | NEW |
---|---|
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3124 Barriers stack_allocated_breakpoints_barriers; | 3124 Barriers stack_allocated_breakpoints_barriers; |
3125 stack_allocated_breakpoints_barriers.Initialize(); | 3125 stack_allocated_breakpoints_barriers.Initialize(); |
3126 breakpoints_barriers = &stack_allocated_breakpoints_barriers; | 3126 breakpoints_barriers = &stack_allocated_breakpoints_barriers; |
3127 | 3127 |
3128 breakpoints_v8_thread.Start(); | 3128 breakpoints_v8_thread.Start(); |
3129 breakpoints_debugger_thread.Start(); | 3129 breakpoints_debugger_thread.Start(); |
3130 | 3130 |
3131 breakpoints_v8_thread.Join(); | 3131 breakpoints_v8_thread.Join(); |
3132 breakpoints_debugger_thread.Join(); | 3132 breakpoints_debugger_thread.Join(); |
3133 } | 3133 } |
3134 | |
3135 | |
3136 static void DummyDebugEventListener(v8::DebugEvent event, | |
3137 v8::Handle<v8::Object> exec_state, | |
3138 v8::Handle<v8::Object> event_data, | |
3139 v8::Handle<v8::Value> data) { | |
3140 } | |
3141 | |
3142 | |
3143 TEST(AddDebugEventListenerOnUninitializedVM) { | |
3144 v8::Debug::AddDebugEventListener(DummyDebugEventListener); | |
3145 } | |
3146 | |
3147 | |
3148 static void DummyMessageHandler(const uint16_t* message, int length, void *data) { | |
Kasper Lund
2008/10/30 10:09:34
Does this lint?
Søren Thygesen Gjesse
2008/10/30 10:27:02
Sorry, broke the line.
| |
3149 } | |
3150 | |
3151 | |
3152 TEST(SetMessageHandlerOnUninitializedVM) { | |
3153 v8::Debug::SetMessageHandler(DummyMessageHandler); | |
3154 } | |
3155 | |
3156 | |
3157 TEST(DebugBreakOnUninitializedVM) { | |
3158 v8::Debug::DebugBreak(); | |
3159 } | |
3160 | |
3161 | |
3162 TEST(SendCommandToUninitializedVM) { | |
3163 const char* dummy_command = "{}"; | |
3164 uint16_t dummy_buffer[80]; | |
3165 int dummy_length = AsciiToUtf16(dummy_command, dummy_buffer); | |
3166 v8::Debug::SendCommand(dummy_buffer, dummy_length); | |
3167 } | |
OLD | NEW |