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 4263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4274 SetBreakPoint(bar, 0); | 4274 SetBreakPoint(bar, 0); |
4275 SetBreakPoint(bar, 4); | 4275 SetBreakPoint(bar, 4); |
4276 | 4276 |
4277 // Make sure that the break points are there. | 4277 // Make sure that the break points are there. |
4278 break_point_hit_count = 0; | 4278 break_point_hit_count = 0; |
4279 foo->Call(env->Global(), 0, NULL); | 4279 foo->Call(env->Global(), 0, NULL); |
4280 CHECK_EQ(2, break_point_hit_count); | 4280 CHECK_EQ(2, break_point_hit_count); |
4281 bar->Call(env->Global(), 0, NULL); | 4281 bar->Call(env->Global(), 0, NULL); |
4282 CHECK_EQ(4, break_point_hit_count); | 4282 CHECK_EQ(4, break_point_hit_count); |
4283 } | 4283 } |
4284 | 4284 |
4285 // Remove the debug event listener without clearing breakpoints. Do this | 4285 // Remove the debug event listener without clearing breakpoints. Do this |
4286 // outside a handle scope. | 4286 // outside a handle scope. |
4287 v8::Debug::SetDebugEventListener(NULL); | 4287 v8::Debug::SetDebugEventListener(NULL); |
4288 CheckDebuggerUnloaded(true); | 4288 CheckDebuggerUnloaded(true); |
4289 | 4289 |
4290 // Now set a debug message handler. | 4290 // Now set a debug message handler. |
4291 break_point_hit_count = 0; | 4291 break_point_hit_count = 0; |
4292 v8::Debug::SetMessageHandler2(MessageHandlerBreakPointHitCount); | 4292 v8::Debug::SetMessageHandler2(MessageHandlerBreakPointHitCount); |
4293 { | 4293 { |
4294 v8::HandleScope scope; | 4294 v8::HandleScope scope; |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5250 v8::Local<v8::Function> f = | 5250 v8::Local<v8::Function> f = |
5251 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f"))); | 5251 v8::Local<v8::Function>::Cast(env->Global()->Get(v8::String::New("f"))); |
5252 f->Call(env->Global(), 0, NULL); | 5252 f->Call(env->Global(), 0, NULL); |
5253 | 5253 |
5254 // Setting message handler to NULL should cause debugger unload. | 5254 // Setting message handler to NULL should cause debugger unload. |
5255 v8::Debug::SetMessageHandler2(NULL); | 5255 v8::Debug::SetMessageHandler2(NULL); |
5256 CheckDebuggerUnloaded(); | 5256 CheckDebuggerUnloaded(); |
5257 | 5257 |
5258 CHECK_EQ(1, exception_event_count); | 5258 CHECK_EQ(1, exception_event_count); |
5259 } | 5259 } |
OLD | NEW |