| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 Isolate::Current()->debugger()->never_unload_debugger_ = false; | 454 Isolate::Current()->debugger()->never_unload_debugger_ = false; |
| 455 Isolate::Current()->debugger()->UnloadDebugger(); | 455 Isolate::Current()->debugger()->UnloadDebugger(); |
| 456 } | 456 } |
| 457 | 457 |
| 458 | 458 |
| 459 } } // namespace v8::internal | 459 } } // namespace v8::internal |
| 460 | 460 |
| 461 | 461 |
| 462 // Check that the debugger has been fully unloaded. | 462 // Check that the debugger has been fully unloaded. |
| 463 static void CheckDebuggerUnloaded(bool check_functions = false) { | 463 static void CheckDebuggerUnloaded(bool check_functions = false) { |
| 464 // Let debugger to unload itself synchronously | 464 if (i::FLAG_optimize_in_parallel) { |
| 465 v8::Debug::ProcessDebugMessages(); | 465 v8::HandleScope scope; |
| 466 | 466 |
| 467 v8::internal::CheckDebuggerUnloaded(check_functions); | 467 // Let debugger to unload itself synchronously |
| 468 v8::Debug::ProcessDebugMessages(); |
| 469 v8::internal::CheckDebuggerUnloaded(check_functions); |
| 470 } else { |
| 471 // Let debugger to unload itself synchronously |
| 472 v8::Debug::ProcessDebugMessages(); |
| 473 v8::internal::CheckDebuggerUnloaded(check_functions); |
| 474 } |
| 468 } | 475 } |
| 469 | 476 |
| 470 | 477 |
| 471 // Inherit from BreakLocationIterator to get access to protected parts for | 478 // Inherit from BreakLocationIterator to get access to protected parts for |
| 472 // testing. | 479 // testing. |
| 473 class TestBreakLocationIterator: public v8::internal::BreakLocationIterator { | 480 class TestBreakLocationIterator: public v8::internal::BreakLocationIterator { |
| 474 public: | 481 public: |
| 475 explicit TestBreakLocationIterator(Handle<v8::internal::DebugInfo> debug_info) | 482 explicit TestBreakLocationIterator(Handle<v8::internal::DebugInfo> debug_info) |
| 476 : BreakLocationIterator(debug_info, v8::internal::SOURCE_BREAK_LOCATIONS) {} | 483 : BreakLocationIterator(debug_info, v8::internal::SOURCE_BREAK_LOCATIONS) {} |
| 477 v8::internal::RelocIterator* it() { return reloc_iterator_; } | 484 v8::internal::RelocIterator* it() { return reloc_iterator_; } |
| (...skipping 6866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7344 "g(false); \n" | 7351 "g(false); \n" |
| 7345 "%OptimizeFunctionOnNextCall(g); \n" | 7352 "%OptimizeFunctionOnNextCall(g); \n" |
| 7346 "g(true);"; | 7353 "g(true);"; |
| 7347 v8::Debug::SetDebugEventListener(DebugBreakInlineListener); | 7354 v8::Debug::SetDebugEventListener(DebugBreakInlineListener); |
| 7348 inline_script = v8::Script::Compile(v8::String::New(source)); | 7355 inline_script = v8::Script::Compile(v8::String::New(source)); |
| 7349 inline_script->Run(); | 7356 inline_script->Run(); |
| 7350 } | 7357 } |
| 7351 | 7358 |
| 7352 | 7359 |
| 7353 #endif // ENABLE_DEBUGGER_SUPPORT | 7360 #endif // ENABLE_DEBUGGER_SUPPORT |
| OLD | NEW |