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

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

Issue 11085070: Enable --verify-heap in release mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: After rebase plus one new issue fix Created 8 years, 2 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
OLDNEW
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 4008 matching lines...) Expand 10 before | Expand all | Expand 10 after
4019 CHECK_EQ(StrLength(expected_step_sequence), 4019 CHECK_EQ(StrLength(expected_step_sequence),
4020 break_point_hit_count); 4020 break_point_hit_count);
4021 4021
4022 // Get rid of the debug event listener. 4022 // Get rid of the debug event listener.
4023 v8::Debug::SetDebugEventListener(NULL); 4023 v8::Debug::SetDebugEventListener(NULL);
4024 CheckDebuggerUnloaded(); 4024 CheckDebuggerUnloaded();
4025 } 4025 }
4026 4026
4027 4027
4028 TEST(DebugBreak) { 4028 TEST(DebugBreak) {
4029 i::FLAG_verify_heap = true;
4029 v8::HandleScope scope; 4030 v8::HandleScope scope;
4030 DebugLocalContext env; 4031 DebugLocalContext env;
4031 4032
4032 // This test should be run with option --verify-heap. As --verify-heap is
4033 // only available in debug mode only check for it in that case.
4034 #ifdef DEBUG
4035 CHECK(v8::internal::FLAG_verify_heap);
4036 #endif
4037
4038 // Register a debug event listener which sets the break flag and counts. 4033 // Register a debug event listener which sets the break flag and counts.
4039 v8::Debug::SetDebugEventListener(DebugEventBreak); 4034 v8::Debug::SetDebugEventListener(DebugEventBreak);
4040 4035
4041 // Create a function for testing stepping. 4036 // Create a function for testing stepping.
4042 const char* src = "function f0() {}" 4037 const char* src = "function f0() {}"
4043 "function f1(x1) {}" 4038 "function f1(x1) {}"
4044 "function f2(x1,x2) {}" 4039 "function f2(x1,x2) {}"
4045 "function f3(x1,x2,x3) {}"; 4040 "function f3(x1,x2,x3) {}";
4046 v8::Local<v8::Function> f0 = CompileFunction(&env, src, "f0"); 4041 v8::Local<v8::Function> f0 = CompileFunction(&env, src, "f0");
4047 v8::Local<v8::Function> f1 = CompileFunction(&env, src, "f1"); 4042 v8::Local<v8::Function> f1 = CompileFunction(&env, src, "f1");
(...skipping 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after
7433 TEST(LiveEditDisabled) { 7428 TEST(LiveEditDisabled) {
7434 v8::internal::FLAG_allow_natives_syntax = true; 7429 v8::internal::FLAG_allow_natives_syntax = true;
7435 v8::HandleScope scope; 7430 v8::HandleScope scope;
7436 LocalContext context; 7431 LocalContext context;
7437 v8::Debug::SetLiveEditEnabled(false); 7432 v8::Debug::SetLiveEditEnabled(false);
7438 CompileRun("%LiveEditCompareStrings('', '')"); 7433 CompileRun("%LiveEditCompareStrings('', '')");
7439 } 7434 }
7440 7435
7441 7436
7442 #endif // ENABLE_DEBUGGER_SUPPORT 7437 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« src/spaces.h ('K') | « src/spaces.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698