OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 static inline void EnableDebugger() { | 607 static inline void EnableDebugger() { |
608 v8::Debug::SetDebugEventListener(&DummyDebugEventListener); | 608 v8::Debug::SetDebugEventListener(&DummyDebugEventListener); |
609 } | 609 } |
610 | 610 |
611 | 611 |
612 static inline void DisableDebugger() { v8::Debug::SetDebugEventListener(NULL); } | 612 static inline void DisableDebugger() { v8::Debug::SetDebugEventListener(NULL); } |
613 | 613 |
614 | 614 |
615 static inline void EmptyMessageQueues(v8::Isolate* isolate) { | 615 static inline void EmptyMessageQueues(v8::Isolate* isolate) { |
616 while (v8::platform::PumpMessageLoop(v8::internal::V8::GetCurrentPlatform(), | 616 while (v8::platform::PumpMessageLoop(v8::internal::V8::GetCurrentPlatform(), |
617 isolate)) | 617 isolate)) { |
618 ; | 618 } |
619 } | 619 } |
620 | 620 |
621 | 621 |
622 class InitializedHandleScope { | 622 class InitializedHandleScope { |
623 public: | 623 public: |
624 InitializedHandleScope() | 624 InitializedHandleScope() |
625 : main_isolate_(CcTest::InitIsolateOnce()), | 625 : main_isolate_(CcTest::InitIsolateOnce()), |
626 handle_scope_(main_isolate_) {} | 626 handle_scope_(main_isolate_) {} |
627 | 627 |
628 // Prefixing the below with main_ reduces a lot of naming clashes. | 628 // Prefixing the below with main_ reduces a lot of naming clashes. |
(...skipping 10 matching lines...) Expand all Loading... |
639 HandleAndZoneScope() {} | 639 HandleAndZoneScope() {} |
640 | 640 |
641 // Prefixing the below with main_ reduces a lot of naming clashes. | 641 // Prefixing the below with main_ reduces a lot of naming clashes. |
642 i::Zone* main_zone() { return &main_zone_; } | 642 i::Zone* main_zone() { return &main_zone_; } |
643 | 643 |
644 private: | 644 private: |
645 i::Zone main_zone_; | 645 i::Zone main_zone_; |
646 }; | 646 }; |
647 | 647 |
648 #endif // ifndef CCTEST_H_ | 648 #endif // ifndef CCTEST_H_ |
OLD | NEW |