| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4134 CHECK_EQ(StrLength(expected_step_sequence), | 4134 CHECK_EQ(StrLength(expected_step_sequence), |
| 4135 break_point_hit_count); | 4135 break_point_hit_count); |
| 4136 | 4136 |
| 4137 // Get rid of the debug event listener. | 4137 // Get rid of the debug event listener. |
| 4138 v8::Debug::SetDebugEventListener(NULL); | 4138 v8::Debug::SetDebugEventListener(NULL); |
| 4139 CheckDebuggerUnloaded(); | 4139 CheckDebuggerUnloaded(); |
| 4140 } | 4140 } |
| 4141 | 4141 |
| 4142 | 4142 |
| 4143 TEST(DebugBreak) { | 4143 TEST(DebugBreak) { |
| 4144 i::FLAG_stress_compaction = false; |
| 4144 #ifdef VERIFY_HEAP | 4145 #ifdef VERIFY_HEAP |
| 4145 i::FLAG_verify_heap = true; | 4146 i::FLAG_verify_heap = true; |
| 4146 #endif | 4147 #endif |
| 4147 DebugLocalContext env; | 4148 DebugLocalContext env; |
| 4148 v8::HandleScope scope(env->GetIsolate()); | 4149 v8::HandleScope scope(env->GetIsolate()); |
| 4149 | 4150 |
| 4150 // Register a debug event listener which sets the break flag and counts. | 4151 // Register a debug event listener which sets the break flag and counts. |
| 4151 v8::Debug::SetDebugEventListener(DebugEventBreak); | 4152 v8::Debug::SetDebugEventListener(DebugEventBreak); |
| 4152 | 4153 |
| 4153 // Create a function for testing stepping. | 4154 // Create a function for testing stepping. |
| (...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6607 script_collected_message_count++; | 6608 script_collected_message_count++; |
| 6608 v8::Handle<v8::Context> context = message.GetEventContext(); | 6609 v8::Handle<v8::Context> context = message.GetEventContext(); |
| 6609 CHECK(context.IsEmpty()); | 6610 CHECK(context.IsEmpty()); |
| 6610 } | 6611 } |
| 6611 } | 6612 } |
| 6612 | 6613 |
| 6613 | 6614 |
| 6614 // Test that GetEventContext doesn't fail and return empty handle for | 6615 // Test that GetEventContext doesn't fail and return empty handle for |
| 6615 // ScriptCollected events. | 6616 // ScriptCollected events. |
| 6616 TEST(ScriptCollectedEventContext) { | 6617 TEST(ScriptCollectedEventContext) { |
| 6618 i::FLAG_stress_compaction = false; |
| 6617 v8::Isolate* isolate = v8::Isolate::GetCurrent(); | 6619 v8::Isolate* isolate = v8::Isolate::GetCurrent(); |
| 6618 v8::internal::Debug* debug = | 6620 v8::internal::Debug* debug = |
| 6619 reinterpret_cast<v8::internal::Isolate*>(isolate)->debug(); | 6621 reinterpret_cast<v8::internal::Isolate*>(isolate)->debug(); |
| 6620 script_collected_message_count = 0; | 6622 script_collected_message_count = 0; |
| 6621 v8::HandleScope scope(isolate); | 6623 v8::HandleScope scope(isolate); |
| 6622 | 6624 |
| 6623 v8::Persistent<v8::Context> context; | 6625 v8::Persistent<v8::Context> context; |
| 6624 { | 6626 { |
| 6625 v8::HandleScope scope(isolate); | 6627 v8::HandleScope scope(isolate); |
| 6626 context.Reset(isolate, v8::Context::New(isolate)); | 6628 context.Reset(isolate, v8::Context::New(isolate)); |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7572 TEST(LiveEditDisabled) { | 7574 TEST(LiveEditDisabled) { |
| 7573 v8::internal::FLAG_allow_natives_syntax = true; | 7575 v8::internal::FLAG_allow_natives_syntax = true; |
| 7574 LocalContext env; | 7576 LocalContext env; |
| 7575 v8::HandleScope scope(env->GetIsolate()); | 7577 v8::HandleScope scope(env->GetIsolate()); |
| 7576 v8::Debug::SetLiveEditEnabled(false); | 7578 v8::Debug::SetLiveEditEnabled(false); |
| 7577 CompileRun("%LiveEditCompareStrings('', '')"); | 7579 CompileRun("%LiveEditCompareStrings('', '')"); |
| 7578 } | 7580 } |
| 7579 | 7581 |
| 7580 | 7582 |
| 7581 #endif // ENABLE_DEBUGGER_SUPPORT | 7583 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |