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

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

Issue 11118018: Enable --verify-heap in release mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « src/store-buffer.cc ('k') | test/cctest/test-heap.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 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 #ifdef VERIFY_HEAP
4030 i::FLAG_verify_heap = true;
4031 #endif
4029 v8::HandleScope scope; 4032 v8::HandleScope scope;
4030 DebugLocalContext env; 4033 DebugLocalContext env;
4031 4034
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. 4035 // Register a debug event listener which sets the break flag and counts.
4039 v8::Debug::SetDebugEventListener(DebugEventBreak); 4036 v8::Debug::SetDebugEventListener(DebugEventBreak);
4040 4037
4041 // Create a function for testing stepping. 4038 // Create a function for testing stepping.
4042 const char* src = "function f0() {}" 4039 const char* src = "function f0() {}"
4043 "function f1(x1) {}" 4040 "function f1(x1) {}"
4044 "function f2(x1,x2) {}" 4041 "function f2(x1,x2) {}"
4045 "function f3(x1,x2,x3) {}"; 4042 "function f3(x1,x2,x3) {}";
4046 v8::Local<v8::Function> f0 = CompileFunction(&env, src, "f0"); 4043 v8::Local<v8::Function> f0 = CompileFunction(&env, src, "f0");
4047 v8::Local<v8::Function> f1 = CompileFunction(&env, src, "f1"); 4044 v8::Local<v8::Function> f1 = CompileFunction(&env, src, "f1");
(...skipping 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after
7433 TEST(LiveEditDisabled) { 7430 TEST(LiveEditDisabled) {
7434 v8::internal::FLAG_allow_natives_syntax = true; 7431 v8::internal::FLAG_allow_natives_syntax = true;
7435 v8::HandleScope scope; 7432 v8::HandleScope scope;
7436 LocalContext context; 7433 LocalContext context;
7437 v8::Debug::SetLiveEditEnabled(false); 7434 v8::Debug::SetLiveEditEnabled(false);
7438 CompileRun("%LiveEditCompareStrings('', '')"); 7435 CompileRun("%LiveEditCompareStrings('', '')");
7439 } 7436 }
7440 7437
7441 7438
7442 #endif // ENABLE_DEBUGGER_SUPPORT 7439 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « src/store-buffer.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698