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

Side by Side Diff: test/cctest/test-heap.cc

Issue 10702166: Do not enter the debugger when debugger is not active. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-debug.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 2
3 #include <stdlib.h> 3 #include <stdlib.h>
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "execution.h" 7 #include "execution.h"
8 #include "factory.h" 8 #include "factory.h"
9 #include "macro-assembler.h" 9 #include "macro-assembler.h"
10 #include "global-handles.h" 10 #include "global-handles.h"
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 CHECK(!function->shared()->is_compiled() || function->IsOptimized()); 977 CHECK(!function->shared()->is_compiled() || function->IsOptimized());
978 CHECK(!function->is_compiled() || function->IsOptimized()); 978 CHECK(!function->is_compiled() || function->IsOptimized());
979 // Call foo to get it recompiled. 979 // Call foo to get it recompiled.
980 CompileRun("foo()"); 980 CompileRun("foo()");
981 CHECK(function->shared()->is_compiled()); 981 CHECK(function->shared()->is_compiled());
982 CHECK(function->is_compiled()); 982 CHECK(function->is_compiled());
983 } 983 }
984 984
985 985
986 // Count the number of global contexts in the weak list of global contexts. 986 // Count the number of global contexts in the weak list of global contexts.
987 static int CountGlobalContexts() { 987 int CountGlobalContexts() {
988 int count = 0; 988 int count = 0;
989 Object* object = HEAP->global_contexts_list(); 989 Object* object = HEAP->global_contexts_list();
990 while (!object->IsUndefined()) { 990 while (!object->IsUndefined()) {
991 count++; 991 count++;
992 object = Context::cast(object)->get(Context::NEXT_CONTEXT_LINK); 992 object = Context::cast(object)->get(Context::NEXT_CONTEXT_LINK);
993 } 993 }
994 return count; 994 return count;
995 } 995 }
996 996
997 997
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 HEAP->CollectAllGarbage(Heap::kNoGCFlags, "triggered by test 1"); 1925 HEAP->CollectAllGarbage(Heap::kNoGCFlags, "triggered by test 1");
1926 CHECK_GE(number_of_test_pages + 1, old_pointer_space->CountTotalPages()); 1926 CHECK_GE(number_of_test_pages + 1, old_pointer_space->CountTotalPages());
1927 HEAP->CollectAllGarbage(Heap::kNoGCFlags, "triggered by test 2"); 1927 HEAP->CollectAllGarbage(Heap::kNoGCFlags, "triggered by test 2");
1928 CHECK_GE(number_of_test_pages + 1, old_pointer_space->CountTotalPages() * 2); 1928 CHECK_GE(number_of_test_pages + 1, old_pointer_space->CountTotalPages() * 2);
1929 1929
1930 // Triggering a last-resort GC should cause all pages to be released 1930 // Triggering a last-resort GC should cause all pages to be released
1931 // to the OS so that other processes can seize the memory. 1931 // to the OS so that other processes can seize the memory.
1932 HEAP->CollectAllAvailableGarbage("triggered really hard"); 1932 HEAP->CollectAllAvailableGarbage("triggered really hard");
1933 CHECK_EQ(1, old_pointer_space->CountTotalPages()); 1933 CHECK_EQ(1, old_pointer_space->CountTotalPages());
1934 } 1934 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698