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

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

Issue 1060533003: Experiment: reduce heap growing factor to investigate OOM impact. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « src/heap/heap.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 6628 matching lines...) Expand 10 before | Expand all | Expand 10 after
6639 reinterpret_cast<Trivial2*>(obj->GetAlignedPointerFromInternalField(1)); 6639 reinterpret_cast<Trivial2*>(obj->GetAlignedPointerFromInternalField(1));
6640 CHECK_EQ(103, t2->x()); 6640 CHECK_EQ(103, t2->x());
6641 6641
6642 handle.SetWeak<v8::Persistent<v8::Object>>( 6642 handle.SetWeak<v8::Persistent<v8::Object>>(
6643 &handle, CheckInternalFields, v8::WeakCallbackType::kInternalFields); 6643 &handle, CheckInternalFields, v8::WeakCallbackType::kInternalFields);
6644 if (!global_gc) { 6644 if (!global_gc) {
6645 handle.MarkIndependent(); 6645 handle.MarkIndependent();
6646 } 6646 }
6647 } 6647 }
6648 if (global_gc) { 6648 if (global_gc) {
6649 CcTest::heap()->CollectAllGarbage(TestHeap::Heap::kNoGCFlags); 6649 CcTest::heap()->CollectAllGarbage(
6650 TestHeap::Heap::kAbortIncrementalMarkingMask);
6650 } else { 6651 } else {
6651 CcTest::heap()->CollectGarbage(i::NEW_SPACE); 6652 CcTest::heap()->CollectGarbage(i::NEW_SPACE);
6652 } 6653 }
6653 6654
6654 CHECK_EQ(1729, t1->x()); 6655 CHECK_EQ(1729, t1->x());
6655 CHECK_EQ(33550336, t2->x()); 6656 CHECK_EQ(33550336, t2->x());
6656 6657
6657 delete t1; 6658 delete t1;
6658 delete t2; 6659 delete t2;
6659 } 6660 }
(...skipping 15256 matching lines...) Expand 10 before | Expand all | Expand 10 after
21916 21917
21917 { 21918 {
21918 v8::HandleScope handle_scope(isolate); 21919 v8::HandleScope handle_scope(isolate);
21919 21920
21920 // Should work 21921 // Should work
21921 v8::Local<v8::Object> obj = v8::Object::New(isolate); 21922 v8::Local<v8::Object> obj = v8::Object::New(isolate);
21922 21923
21923 USE(obj); 21924 USE(obj);
21924 } 21925 }
21925 } 21926 }
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698