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

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

Issue 3151037: Change code contains function to allow a return address just after the last instruction (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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/cctest.status ('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 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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 // Perform a garbage collection when break point is hit and continue. Based 863 // Perform a garbage collection when break point is hit and continue. Based
864 // on the number of break points hit either scavenge or mark compact 864 // on the number of break points hit either scavenge or mark compact
865 // collector is used. 865 // collector is used.
866 if (event == v8::Break) { 866 if (event == v8::Break) {
867 break_point_hit_count++; 867 break_point_hit_count++;
868 if (break_point_hit_count % 2 == 0) { 868 if (break_point_hit_count % 2 == 0) {
869 // Scavenge. 869 // Scavenge.
870 Heap::CollectGarbage(0, v8::internal::NEW_SPACE); 870 Heap::CollectGarbage(0, v8::internal::NEW_SPACE);
871 } else { 871 } else {
872 // Mark sweep (and perhaps compact). 872 // Mark sweep (and perhaps compact).
873 Heap::CollectAllGarbage(false); 873 Heap::CollectAllGarbage(true);
874 } 874 }
875 } 875 }
876 } 876 }
877 877
878 878
879 // Debug event handler which re-issues a debug break and calls the garbage 879 // Debug event handler which re-issues a debug break and calls the garbage
880 // collector to have the heap verified. 880 // collector to have the heap verified.
881 static void DebugEventBreak(v8::DebugEvent event, 881 static void DebugEventBreak(v8::DebugEvent event,
882 v8::Handle<v8::Object> exec_state, 882 v8::Handle<v8::Object> exec_state,
883 v8::Handle<v8::Object> event_data, 883 v8::Handle<v8::Object> event_data,
(...skipping 5953 matching lines...) Expand 10 before | Expand all | Expand 10 after
6837 6837
6838 CHECK_EQ(2, TestClientData::constructor_call_counter); 6838 CHECK_EQ(2, TestClientData::constructor_call_counter);
6839 CHECK_EQ(TestClientData::constructor_call_counter, 6839 CHECK_EQ(TestClientData::constructor_call_counter,
6840 TestClientData::destructor_call_counter); 6840 TestClientData::destructor_call_counter);
6841 6841
6842 v8::Debug::SetDebugEventListener(NULL); 6842 v8::Debug::SetDebugEventListener(NULL);
6843 CheckDebuggerUnloaded(); 6843 CheckDebuggerUnloaded();
6844 } 6844 }
6845 6845
6846 #endif // ENABLE_DEBUGGER_SUPPORT 6846 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698