| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 do { | 110 do { |
| 111 { | 111 { |
| 112 v8::Isolate* isolate = CcTest::default_isolate(); | 112 v8::Isolate* isolate = CcTest::default_isolate(); |
| 113 v8::Locker locker(isolate); | 113 v8::Locker locker(isolate); |
| 114 if (turn == CLEAN_CACHE) { | 114 if (turn == CLEAN_CACHE) { |
| 115 v8::HandleScope scope(isolate); | 115 v8::HandleScope scope(isolate); |
| 116 v8::Handle<v8::Context> context = v8::Context::New(isolate); | 116 v8::Handle<v8::Context> context = v8::Context::New(isolate); |
| 117 v8::Context::Scope context_scope(context); | 117 v8::Context::Scope context_scope(context); |
| 118 | 118 |
| 119 // Clear the caches by forcing major GC. | 119 // Clear the caches by forcing major GC. |
| 120 HEAP->CollectAllGarbage(v8::internal::Heap::kNoGCFlags); | 120 CcTest::heap()->CollectAllGarbage(v8::internal::Heap::kNoGCFlags); |
| 121 turn = SECOND_TIME_FILL_CACHE; | 121 turn = SECOND_TIME_FILL_CACHE; |
| 122 break; | 122 break; |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 Thread::YieldCPU(); | 126 Thread::YieldCPU(); |
| 127 } while (true); | 127 } while (true); |
| 128 } | 128 } |
| 129 }; | 129 }; |
| 130 | 130 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 Join(); | 206 Join(); |
| 207 } | 207 } |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 | 210 |
| 211 TEST(ThreadJoinSelf) { | 211 TEST(ThreadJoinSelf) { |
| 212 ThreadC thread; | 212 ThreadC thread; |
| 213 thread.Start(); | 213 thread.Start(); |
| 214 thread.Join(); | 214 thread.Join(); |
| 215 } | 215 } |
| OLD | NEW |