OLD | NEW |
---|---|
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 15183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15194 } | 15194 } |
15195 { | 15195 { |
15196 v8::Locker locker(CcTest::default_isolate()); | 15196 v8::Locker locker(CcTest::default_isolate()); |
15197 CHECK(stack_limit == set_limit); | 15197 CHECK(stack_limit == set_limit); |
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; |
Michael Starzinger
2013/02/08 12:30:11
I know it's not your change, but can we rename the
| |
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 Loading... | |
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 |
OLD | NEW |