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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 } | 436 } |
437 } | 437 } |
438 } | 438 } |
439 | 439 |
440 | 440 |
441 } } // namespace v8::internal | 441 } } // namespace v8::internal |
442 | 442 |
443 | 443 |
444 // Check that the debugger has been fully unloaded. | 444 // Check that the debugger has been fully unloaded. |
445 static void CheckDebuggerUnloaded(bool check_functions = false) { | 445 static void CheckDebuggerUnloaded(bool check_functions = false) { |
| 446 // Let debugger to unload itself synchronously |
| 447 v8::Debug::ProcessDebugMessages(); |
| 448 |
446 v8::internal::CheckDebuggerUnloaded(check_functions); | 449 v8::internal::CheckDebuggerUnloaded(check_functions); |
447 } | 450 } |
448 | 451 |
449 | 452 |
450 // Inherit from BreakLocationIterator to get access to protected parts for | 453 // Inherit from BreakLocationIterator to get access to protected parts for |
451 // testing. | 454 // testing. |
452 class TestBreakLocationIterator: public v8::internal::BreakLocationIterator { | 455 class TestBreakLocationIterator: public v8::internal::BreakLocationIterator { |
453 public: | 456 public: |
454 explicit TestBreakLocationIterator(Handle<v8::internal::DebugInfo> debug_info) | 457 explicit TestBreakLocationIterator(Handle<v8::internal::DebugInfo> debug_info) |
455 : BreakLocationIterator(debug_info, v8::internal::SOURCE_BREAK_LOCATIONS) {} | 458 : BreakLocationIterator(debug_info, v8::internal::SOURCE_BREAK_LOCATIONS) {} |
(...skipping 5368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5824 | 5827 |
5825 break_point_hit_count = 0; | 5828 break_point_hit_count = 0; |
5826 foo->Call(env->Global(), 0, NULL); | 5829 foo->Call(env->Global(), 0, NULL); |
5827 CHECK_EQ(1, break_point_hit_count); | 5830 CHECK_EQ(1, break_point_hit_count); |
5828 | 5831 |
5829 v8::Debug::SetDebugEventListener(NULL); | 5832 v8::Debug::SetDebugEventListener(NULL); |
5830 debugee_context = v8::Handle<v8::Context>(); | 5833 debugee_context = v8::Handle<v8::Context>(); |
5831 debugger_context = v8::Handle<v8::Context>(); | 5834 debugger_context = v8::Handle<v8::Context>(); |
5832 CheckDebuggerUnloaded(); | 5835 CheckDebuggerUnloaded(); |
5833 } | 5836 } |
OLD | NEW |