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

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

Issue 555072: Merge ObjectIterator::has_next and ObjectIterator::next methods.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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-api.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 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // information stored for the debugger. 406 // information stored for the debugger.
407 CHECK(Debug::debug_context().is_null()); 407 CHECK(Debug::debug_context().is_null());
408 CHECK_EQ(NULL, Debug::debug_info_list_); 408 CHECK_EQ(NULL, Debug::debug_info_list_);
409 409
410 // Collect garbage to ensure weak handles are cleared. 410 // Collect garbage to ensure weak handles are cleared.
411 Heap::CollectAllGarbage(false); 411 Heap::CollectAllGarbage(false);
412 Heap::CollectAllGarbage(false); 412 Heap::CollectAllGarbage(false);
413 413
414 // Iterate the head and check that there are no debugger related objects left. 414 // Iterate the head and check that there are no debugger related objects left.
415 HeapIterator iterator; 415 HeapIterator iterator;
416 while (iterator.has_next()) { 416 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
417 HeapObject* obj = iterator.next();
418 CHECK(obj != NULL);
419 CHECK(!obj->IsDebugInfo()); 417 CHECK(!obj->IsDebugInfo());
420 CHECK(!obj->IsBreakPointInfo()); 418 CHECK(!obj->IsBreakPointInfo());
421 419
422 // If deep check of functions is requested check that no debug break code 420 // If deep check of functions is requested check that no debug break code
423 // is left in all functions. 421 // is left in all functions.
424 if (check_functions) { 422 if (check_functions) {
425 if (obj->IsJSFunction()) { 423 if (obj->IsJSFunction()) {
426 JSFunction* fun = JSFunction::cast(obj); 424 JSFunction* fun = JSFunction::cast(obj);
427 for (RelocIterator it(fun->shared()->code()); !it.done(); it.next()) { 425 for (RelocIterator it(fun->shared()->code()); !it.done(); it.next()) {
428 RelocInfo::Mode rmode = it.rinfo()->rmode(); 426 RelocInfo::Mode rmode = it.rinfo()->rmode();
(...skipping 5644 matching lines...) Expand 10 before | Expand all | Expand 10 after
6073 6071
6074 break_point_hit_count = 0; 6072 break_point_hit_count = 0;
6075 foo->Call(env->Global(), 0, NULL); 6073 foo->Call(env->Global(), 0, NULL);
6076 CHECK_EQ(1, break_point_hit_count); 6074 CHECK_EQ(1, break_point_hit_count);
6077 6075
6078 v8::Debug::SetDebugEventListener(NULL); 6076 v8::Debug::SetDebugEventListener(NULL);
6079 debugee_context = v8::Handle<v8::Context>(); 6077 debugee_context = v8::Handle<v8::Context>();
6080 debugger_context = v8::Handle<v8::Context>(); 6078 debugger_context = v8::Handle<v8::Context>();
6081 CheckDebuggerUnloaded(); 6079 CheckDebuggerUnloaded();
6082 } 6080 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698