| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 { | 90 { |
| 91 v8::Isolate* isolate = CcTest::isolate(); | 91 v8::Isolate* isolate = CcTest::isolate(); |
| 92 v8::Locker locker(isolate); | 92 v8::Locker locker(isolate); |
| 93 v8::Isolate::Scope isolate_scope(isolate); | 93 v8::Isolate::Scope isolate_scope(isolate); |
| 94 if (turn == CLEAN_CACHE) { | 94 if (turn == CLEAN_CACHE) { |
| 95 v8::HandleScope scope(isolate); | 95 v8::HandleScope scope(isolate); |
| 96 v8::Handle<v8::Context> context = v8::Context::New(isolate); | 96 v8::Handle<v8::Context> context = v8::Context::New(isolate); |
| 97 v8::Context::Scope context_scope(context); | 97 v8::Context::Scope context_scope(context); |
| 98 | 98 |
| 99 // Clear the caches by forcing major GC. | 99 // Clear the caches by forcing major GC. |
| 100 CcTest::heap()->CollectAllGarbage(); | 100 CcTest::heap()->CollectAllGarbage(v8::internal::Heap::kNoGCFlags); |
| 101 turn = SECOND_TIME_FILL_CACHE; | 101 turn = SECOND_TIME_FILL_CACHE; |
| 102 break; | 102 break; |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 Thread::YieldCPU(); | 106 Thread::YieldCPU(); |
| 107 } while (true); | 107 } while (true); |
| 108 } | 108 } |
| 109 }; | 109 }; |
| 110 | 110 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 refs.Add(i::ThreadId::Invalid()); | 168 refs.Add(i::ThreadId::Invalid()); |
| 169 } | 169 } |
| 170 prev->Start(); | 170 prev->Start(); |
| 171 for (int i = 0; i < kNThreads; i++) { | 171 for (int i = 0; i < kNThreads; i++) { |
| 172 semaphore.Wait(); | 172 semaphore.Wait(); |
| 173 } | 173 } |
| 174 for (int i = 0; i < kNThreads; i++) { | 174 for (int i = 0; i < kNThreads; i++) { |
| 175 delete threads[i]; | 175 delete threads[i]; |
| 176 } | 176 } |
| 177 } | 177 } |
| OLD | NEW |