Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: test/cctest/cctest.h

Issue 1181013007: Debugger: require debugger to be active when dealing with breaks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix yet another test Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 while (!marking->IsComplete()) { 568 while (!marking->IsComplete()) {
569 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); 569 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD);
570 if (marking->IsReadyToOverApproximateWeakClosure()) { 570 if (marking->IsReadyToOverApproximateWeakClosure()) {
571 marking->MarkObjectGroups(); 571 marking->MarkObjectGroups();
572 } 572 }
573 } 573 }
574 CHECK(marking->IsComplete()); 574 CHECK(marking->IsComplete());
575 } 575 }
576 576
577 577
578 static void DummyDebugEventListener(
579 const v8::Debug::EventDetails& event_details) {}
580
581
582 static inline void EnableDebugger() {
583 v8::Debug::SetDebugEventListener(&DummyDebugEventListener);
584 }
585
586
587 static inline void DisableDebugger() { v8::Debug::SetDebugEventListener(NULL); }
588
589
578 // Helper class for new allocations tracking and checking. 590 // Helper class for new allocations tracking and checking.
579 // To use checking of JS allocations tracking in a test, 591 // To use checking of JS allocations tracking in a test,
580 // just create an instance of this class. 592 // just create an instance of this class.
581 class HeapObjectsTracker { 593 class HeapObjectsTracker {
582 public: 594 public:
583 HeapObjectsTracker() { 595 HeapObjectsTracker() {
584 heap_profiler_ = i::Isolate::Current()->heap_profiler(); 596 heap_profiler_ = i::Isolate::Current()->heap_profiler();
585 CHECK_NOT_NULL(heap_profiler_); 597 CHECK_NOT_NULL(heap_profiler_);
586 heap_profiler_->StartHeapObjectsTracking(true); 598 heap_profiler_->StartHeapObjectsTracking(true);
587 } 599 }
(...skipping 29 matching lines...) Expand all
617 HandleAndZoneScope() {} 629 HandleAndZoneScope() {}
618 630
619 // Prefixing the below with main_ reduces a lot of naming clashes. 631 // Prefixing the below with main_ reduces a lot of naming clashes.
620 i::Zone* main_zone() { return &main_zone_; } 632 i::Zone* main_zone() { return &main_zone_; }
621 633
622 private: 634 private:
623 i::Zone main_zone_; 635 i::Zone main_zone_;
624 }; 636 };
625 637
626 #endif // ifndef CCTEST_H_ 638 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698