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

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

Issue 1961373003: [heap] Do not invoke GC to make heap iterable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-log.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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 // Check that the debugger has been fully unloaded. 372 // Check that the debugger has been fully unloaded.
373 void CheckDebuggerUnloaded(bool check_functions) { 373 void CheckDebuggerUnloaded(bool check_functions) {
374 // Check that the debugger context is cleared and that there is no debug 374 // Check that the debugger context is cleared and that there is no debug
375 // information stored for the debugger. 375 // information stored for the debugger.
376 CHECK(CcTest::i_isolate()->debug()->debug_context().is_null()); 376 CHECK(CcTest::i_isolate()->debug()->debug_context().is_null());
377 CHECK(!CcTest::i_isolate()->debug()->debug_info_list_); 377 CHECK(!CcTest::i_isolate()->debug()->debug_info_list_);
378 378
379 // Collect garbage to ensure weak handles are cleared. 379 // Collect garbage to ensure weak handles are cleared.
380 CcTest::heap()->CollectAllGarbage(); 380 CcTest::heap()->CollectAllGarbage();
381 CcTest::heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask); 381 CcTest::heap()->CollectAllGarbage();
382 382
383 // Iterate the head and check that there are no debugger related objects left. 383 // Iterate the head and check that there are no debugger related objects left.
384 HeapIterator iterator(CcTest::heap()); 384 HeapIterator iterator(CcTest::heap());
385 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { 385 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
386 CHECK(!obj->IsDebugInfo()); 386 CHECK(!obj->IsDebugInfo());
387 CHECK(!obj->IsBreakPointInfo()); 387 CHECK(!obj->IsBreakPointInfo());
388 388
389 // If deep check of functions is requested check that no debug break code 389 // If deep check of functions is requested check that no debug break code
390 // is left in all functions. 390 // is left in all functions.
391 if (check_functions) { 391 if (check_functions) {
(...skipping 7788 matching lines...) Expand 10 before | Expand all | Expand 10 after
8180 "function foo() {\n" 8180 "function foo() {\n"
8181 " try { throw new Error(); } catch (e) {}\n" 8181 " try { throw new Error(); } catch (e) {}\n"
8182 "}\n" 8182 "}\n"
8183 "debugger;\n" 8183 "debugger;\n"
8184 "foo();\n" 8184 "foo();\n"
8185 "foo();\n"); 8185 "foo();\n");
8186 8186
8187 v8::Debug::SetDebugEventListener(env->GetIsolate(), nullptr); 8187 v8::Debug::SetDebugEventListener(env->GetIsolate(), nullptr);
8188 CHECK_EQ(break_point_hit_count, 4); 8188 CHECK_EQ(break_point_hit_count, 4);
8189 } 8189 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698