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

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

Issue 1272183002: Version 4.5.103.18 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: 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/heap/gc-idle-time-handler.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 15361 matching lines...) Expand 10 before | Expand all | Expand 10 after
15372 CHECK_GT(size_with_garbage, initial_size + MB); 15372 CHECK_GT(size_with_garbage, initial_size + MB);
15373 bool finished = false; 15373 bool finished = false;
15374 for (int i = 0; i < 200 && !finished; i++) { 15374 for (int i = 0; i < 200 && !finished; i++) {
15375 if (i < 10 && CcTest::heap()->incremental_marking()->IsStopped()) { 15375 if (i < 10 && CcTest::heap()->incremental_marking()->IsStopped()) {
15376 CcTest::heap()->StartIdleIncrementalMarking(); 15376 CcTest::heap()->StartIdleIncrementalMarking();
15377 } 15377 }
15378 finished = env->GetIsolate()->IdleNotificationDeadline( 15378 finished = env->GetIsolate()->IdleNotificationDeadline(
15379 (v8::base::TimeTicks::HighResolutionNow().ToInternalValue() / 15379 (v8::base::TimeTicks::HighResolutionNow().ToInternalValue() /
15380 static_cast<double>(v8::base::Time::kMicrosecondsPerSecond)) + 15380 static_cast<double>(v8::base::Time::kMicrosecondsPerSecond)) +
15381 IdlePauseInSeconds); 15381 IdlePauseInSeconds);
15382 if (CcTest::heap()->mark_compact_collector()->sweeping_in_progress()) {
15383 CcTest::heap()->mark_compact_collector()->EnsureSweepingCompleted();
15384 }
15382 } 15385 }
15383 intptr_t final_size = CcTest::heap()->SizeOfObjects(); 15386 intptr_t final_size = CcTest::heap()->SizeOfObjects();
15384 CHECK(finished); 15387 CHECK(finished);
15385 CHECK_LT(final_size, initial_size + 1); 15388 CHECK_LT(final_size, initial_size + 1);
15386 } 15389 }
15387 15390
15388 15391
15389 TEST(Regress2333) { 15392 TEST(Regress2333) {
15390 LocalContext env; 15393 LocalContext env;
15391 for (int i = 0; i < 3; i++) { 15394 for (int i = 0; i < 3; i++) {
(...skipping 6456 matching lines...) Expand 10 before | Expand all | Expand 10 after
21848 " fake.age;\n" 21851 " fake.age;\n"
21849 " result = 1;\n" 21852 " result = 1;\n"
21850 " } catch (e) {\n" 21853 " } catch (e) {\n"
21851 " }\n" 21854 " }\n"
21852 " test(d+1);\n" 21855 " test(d+1);\n"
21853 "}\n" 21856 "}\n"
21854 "test(0);\n" 21857 "test(0);\n"
21855 "result;\n", 21858 "result;\n",
21856 0); 21859 0);
21857 } 21860 }
OLDNEW
« no previous file with comments | « src/heap/gc-idle-time-handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698