| 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 4179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4190 // Set the debug break flag. | 4190 // Set the debug break flag. |
| 4191 v8::Debug::DebugBreak(); | 4191 v8::Debug::DebugBreak(); |
| 4192 | 4192 |
| 4193 // Call all functions with different argument count. | 4193 // Call all functions with different argument count. |
| 4194 break_point_hit_count = 0; | 4194 break_point_hit_count = 0; |
| 4195 f->Call(env->Global(), 0, NULL); | 4195 f->Call(env->Global(), 0, NULL); |
| 4196 CHECK_EQ(1, break_point_hit_count); | 4196 CHECK_EQ(1, break_point_hit_count); |
| 4197 | 4197 |
| 4198 { | 4198 { |
| 4199 v8::Debug::DebugBreak(); | 4199 v8::Debug::DebugBreak(); |
| 4200 v8::internal::DisableBreak disable_break(true); | 4200 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(env->GetIsolate()); |
| 4201 v8::internal::DisableBreak disable_break(isolate, true); |
| 4201 f->Call(env->Global(), 0, NULL); | 4202 f->Call(env->Global(), 0, NULL); |
| 4202 CHECK_EQ(1, break_point_hit_count); | 4203 CHECK_EQ(1, break_point_hit_count); |
| 4203 } | 4204 } |
| 4204 | 4205 |
| 4205 f->Call(env->Global(), 0, NULL); | 4206 f->Call(env->Global(), 0, NULL); |
| 4206 CHECK_EQ(2, break_point_hit_count); | 4207 CHECK_EQ(2, break_point_hit_count); |
| 4207 | 4208 |
| 4208 // Get rid of the debug event listener. | 4209 // Get rid of the debug event listener. |
| 4209 v8::Debug::SetDebugEventListener2(NULL); | 4210 v8::Debug::SetDebugEventListener2(NULL); |
| 4210 CheckDebuggerUnloaded(); | 4211 CheckDebuggerUnloaded(); |
| (...skipping 3339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7550 TEST(LiveEditDisabled) { | 7551 TEST(LiveEditDisabled) { |
| 7551 v8::internal::FLAG_allow_natives_syntax = true; | 7552 v8::internal::FLAG_allow_natives_syntax = true; |
| 7552 LocalContext env; | 7553 LocalContext env; |
| 7553 v8::HandleScope scope(env->GetIsolate()); | 7554 v8::HandleScope scope(env->GetIsolate()); |
| 7554 v8::Debug::SetLiveEditEnabled(false); | 7555 v8::Debug::SetLiveEditEnabled(false); |
| 7555 CompileRun("%LiveEditCompareStrings('', '')"); | 7556 CompileRun("%LiveEditCompareStrings('', '')"); |
| 7556 } | 7557 } |
| 7557 | 7558 |
| 7558 | 7559 |
| 7559 #endif // ENABLE_DEBUGGER_SUPPORT | 7560 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |