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

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

Issue 12207076: Added new GetHeapStatistics API entry and deprecated old one. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed Clear() again. Created 7 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 | « 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 15187 matching lines...) Expand 10 before | Expand all | Expand 10 after
15198 } 15198 }
15199 } 15199 }
15200 15200
15201 15201
15202 THREADED_TEST(GetHeapStatistics) { 15202 THREADED_TEST(GetHeapStatistics) {
15203 v8::HandleScope scope; 15203 v8::HandleScope scope;
15204 LocalContext c1; 15204 LocalContext c1;
15205 v8::HeapStatistics heap_statistics; 15205 v8::HeapStatistics heap_statistics;
15206 CHECK_EQ(static_cast<int>(heap_statistics.total_heap_size()), 0); 15206 CHECK_EQ(static_cast<int>(heap_statistics.total_heap_size()), 0);
15207 CHECK_EQ(static_cast<int>(heap_statistics.used_heap_size()), 0); 15207 CHECK_EQ(static_cast<int>(heap_statistics.used_heap_size()), 0);
15208 v8::V8::GetHeapStatistics(&heap_statistics); 15208 c1->GetIsolate()->GetHeapStatistics(&heap_statistics);
15209 CHECK_NE(static_cast<int>(heap_statistics.total_heap_size()), 0); 15209 CHECK_NE(static_cast<int>(heap_statistics.total_heap_size()), 0);
15210 CHECK_NE(static_cast<int>(heap_statistics.used_heap_size()), 0); 15210 CHECK_NE(static_cast<int>(heap_statistics.used_heap_size()), 0);
15211 } 15211 }
15212 15212
15213 15213
15214 class VisitorImpl : public v8::ExternalResourceVisitor { 15214 class VisitorImpl : public v8::ExternalResourceVisitor {
15215 public: 15215 public:
15216 explicit VisitorImpl(TestResource** resource) { 15216 explicit VisitorImpl(TestResource** resource) {
15217 for (int i = 0; i < 4; i++) { 15217 for (int i = 0; i < 4; i++) {
15218 resource_[i] = resource[i]; 15218 resource_[i] = resource[i];
(...skipping 2996 matching lines...) Expand 10 before | Expand all | Expand 10 after
18215 i::Semaphore* sem_; 18215 i::Semaphore* sem_;
18216 volatile int sem_value_; 18216 volatile int sem_value_;
18217 }; 18217 };
18218 18218
18219 18219
18220 THREADED_TEST(SemaphoreInterruption) { 18220 THREADED_TEST(SemaphoreInterruption) {
18221 ThreadInterruptTest().RunTest(); 18221 ThreadInterruptTest().RunTest();
18222 } 18222 }
18223 18223
18224 #endif // WIN32 18224 #endif // WIN32
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