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

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

Issue 1274983002: [GC] Check for incremental marking when a GC is triggered on reaching the external allocation limit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch to knitted cctest Created 5 years, 4 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/api.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 12556 matching lines...) Expand 10 before | Expand all | Expand 10 after
12567 isolate->AdjustAmountOfExternalAllocatedMemory(-kSize)); 12567 isolate->AdjustAmountOfExternalAllocatedMemory(-kSize));
12568 const int64_t kTriggerGCSize = 12568 const int64_t kTriggerGCSize =
12569 v8::internal::Internals::kExternalAllocationLimit + 1; 12569 v8::internal::Internals::kExternalAllocationLimit + 1;
12570 CHECK_EQ(baseline + kTriggerGCSize, 12570 CHECK_EQ(baseline + kTriggerGCSize,
12571 isolate->AdjustAmountOfExternalAllocatedMemory(kTriggerGCSize)); 12571 isolate->AdjustAmountOfExternalAllocatedMemory(kTriggerGCSize));
12572 CHECK_EQ(baseline, 12572 CHECK_EQ(baseline,
12573 isolate->AdjustAmountOfExternalAllocatedMemory(-kTriggerGCSize)); 12573 isolate->AdjustAmountOfExternalAllocatedMemory(-kTriggerGCSize));
12574 } 12574 }
12575 12575
12576 12576
12577 TEST(Regress51719) {
12578 i::FLAG_incremental_marking = false;
12579 CcTest::InitializeVM();
12580
12581 const int64_t kTriggerGCSize =
12582 v8::internal::Internals::kExternalAllocationLimit + 1;
12583 v8::Isolate* isolate = CcTest::isolate();
12584 isolate->AdjustAmountOfExternalAllocatedMemory(kTriggerGCSize);
12585 }
12586
12587
12577 // Regression test for issue 54, object templates with internal fields 12588 // Regression test for issue 54, object templates with internal fields
12578 // but no accessors or interceptors did not get their internal field 12589 // but no accessors or interceptors did not get their internal field
12579 // count set on instances. 12590 // count set on instances.
12580 THREADED_TEST(Regress54) { 12591 THREADED_TEST(Regress54) {
12581 LocalContext context; 12592 LocalContext context;
12582 v8::Isolate* isolate = context->GetIsolate(); 12593 v8::Isolate* isolate = context->GetIsolate();
12583 v8::HandleScope outer(isolate); 12594 v8::HandleScope outer(isolate);
12584 static v8::Persistent<v8::ObjectTemplate> templ; 12595 static v8::Persistent<v8::ObjectTemplate> templ;
12585 if (templ.IsEmpty()) { 12596 if (templ.IsEmpty()) {
12586 v8::EscapableHandleScope inner(isolate); 12597 v8::EscapableHandleScope inner(isolate);
(...skipping 9224 matching lines...) Expand 10 before | Expand all | Expand 10 after
21811 CHECK(try_catch.HasTerminated()); 21822 CHECK(try_catch.HasTerminated());
21812 } 21823 }
21813 21824
21814 21825
21815 TEST(EstimatedContextSize) { 21826 TEST(EstimatedContextSize) {
21816 v8::Isolate* isolate = CcTest::isolate(); 21827 v8::Isolate* isolate = CcTest::isolate();
21817 v8::HandleScope scope(isolate); 21828 v8::HandleScope scope(isolate);
21818 LocalContext env; 21829 LocalContext env;
21819 CHECK(50000 < env->EstimatedSize()); 21830 CHECK(50000 < env->EstimatedSize());
21820 } 21831 }
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698