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

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

Issue 144313017: Make LeakSanitizer happy, part 2. Fixed register usage on the way. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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-global-handles.cc ('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 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 3465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3476 while (data->next < data->limit) { 3476 while (data->next < data->limit) {
3477 Handle<Object> obj(heap->empty_string(), isolate); 3477 Handle<Object> obj(heap->empty_string(), isolate);
3478 } 3478 }
3479 // An entire block of handles has been filled. 3479 // An entire block of handles has been filled.
3480 // Next handle would require a new block. 3480 // Next handle would require a new block.
3481 ASSERT(data->next == data->limit); 3481 ASSERT(data->next == data->limit);
3482 3482
3483 DeferredHandleScope deferred(isolate); 3483 DeferredHandleScope deferred(isolate);
3484 DummyVisitor visitor; 3484 DummyVisitor visitor;
3485 isolate->handle_scope_implementer()->Iterate(&visitor); 3485 isolate->handle_scope_implementer()->Iterate(&visitor);
3486 deferred.Detach(); 3486 delete deferred.Detach();
3487 } 3487 }
3488 3488
3489 3489
3490 TEST(IncrementalMarkingStepMakesBigProgressWithLargeObjects) { 3490 TEST(IncrementalMarkingStepMakesBigProgressWithLargeObjects) {
3491 CcTest::InitializeVM(); 3491 CcTest::InitializeVM();
3492 v8::HandleScope scope(CcTest::isolate()); 3492 v8::HandleScope scope(CcTest::isolate());
3493 CompileRun("function f(n) {" 3493 CompileRun("function f(n) {"
3494 " var a = new Array(n);" 3494 " var a = new Array(n);"
3495 " for (var i = 0; i < n; i += 100) a[i] = i;" 3495 " for (var i = 0; i < n; i += 100) a[i] = i;"
3496 "};" 3496 "};"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3679 code = scope.CloseAndEscape(Handle<Code>(bar->code())); 3679 code = scope.CloseAndEscape(Handle<Code>(bar->code()));
3680 } 3680 }
3681 3681
3682 // Now make sure that a gc should get rid of the function 3682 // Now make sure that a gc should get rid of the function
3683 for (int i = 0; i < 4; i++) { 3683 for (int i = 0; i < 4; i++) {
3684 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); 3684 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
3685 } 3685 }
3686 3686
3687 ASSERT(code->marked_for_deoptimization()); 3687 ASSERT(code->marked_for_deoptimization());
3688 } 3688 }
OLDNEW
« no previous file with comments | « test/cctest/test-global-handles.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698