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-api.cc

Issue 1086423003: Make test unthreaded so other tests don't interfere with heap size (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 | « no previous file | 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 6545 matching lines...) Expand 10 before | Expand all | Expand 10 after
6556 CcTest::heap()->CollectGarbage(i::NEW_SPACE); 6556 CcTest::heap()->CollectGarbage(i::NEW_SPACE);
6557 } 6557 }
6558 // A single GC should be enough to reclaim the memory, since we are using 6558 // A single GC should be enough to reclaim the memory, since we are using
6559 // phantom handles. 6559 // phantom handles.
6560 CHECK_LT(CcTest::heap()->SizeOfObjects(), big_heap_size - 200000); 6560 CHECK_LT(CcTest::heap()->SizeOfObjects(), big_heap_size - 200000);
6561 CHECK(object_a.flag); 6561 CHECK(object_a.flag);
6562 CHECK(object_b.flag); 6562 CHECK(object_b.flag);
6563 } 6563 }
6564 6564
6565 6565
6566 THREADED_TEST(IndependentWeakHandle) { 6566 TEST(IndependentWeakHandle) {
6567 IndependentWeakHandle(false, false); 6567 IndependentWeakHandle(false, false);
6568 IndependentWeakHandle(false, true); 6568 IndependentWeakHandle(false, true);
6569 IndependentWeakHandle(true, false); 6569 IndependentWeakHandle(true, false);
6570 IndependentWeakHandle(true, true); 6570 IndependentWeakHandle(true, true);
6571 } 6571 }
6572 6572
6573 6573
6574 class Trivial { 6574 class Trivial {
6575 public: 6575 public:
6576 explicit Trivial(int x) : x_(x) {} 6576 explicit Trivial(int x) : x_(x) {}
(...skipping 15316 matching lines...) Expand 10 before | Expand all | Expand 10 after
21893 } 21893 }
21894 { 21894 {
21895 v8::TryCatch try_catch; 21895 v8::TryCatch try_catch;
21896 uint16_t* data = reinterpret_cast<uint16_t*>(buffer); 21896 uint16_t* data = reinterpret_cast<uint16_t*>(buffer);
21897 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, 21897 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString,
21898 length).IsEmpty()); 21898 length).IsEmpty());
21899 CHECK(!try_catch.HasCaught()); 21899 CHECK(!try_catch.HasCaught());
21900 } 21900 }
21901 free(buffer); 21901 free(buffer);
21902 } 21902 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698