| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 v8::base::RandomNumberGenerator* CcTest::random_number_generator() { | 128 v8::base::RandomNumberGenerator* CcTest::random_number_generator() { |
| 129 return InitIsolateOnce()->random_number_generator(); | 129 return InitIsolateOnce()->random_number_generator(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 v8::Local<v8::Object> CcTest::global() { | 132 v8::Local<v8::Object> CcTest::global() { |
| 133 return isolate()->GetCurrentContext()->Global(); | 133 return isolate()->GetCurrentContext()->Global(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void CcTest::InitializeVM() { | 136 void CcTest::InitializeVM() { |
| 137 CHECK(!v8::base::NoBarrier_Load(&isolate_used_)); | 137 CHECK(!v8::base::Relaxed_Load(&isolate_used_)); |
| 138 CHECK(!initialize_called_); | 138 CHECK(!initialize_called_); |
| 139 initialize_called_ = true; | 139 initialize_called_ = true; |
| 140 v8::HandleScope handle_scope(CcTest::isolate()); | 140 v8::HandleScope handle_scope(CcTest::isolate()); |
| 141 v8::Context::New(CcTest::isolate())->Enter(); | 141 v8::Context::New(CcTest::isolate())->Enter(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void CcTest::TearDown() { | 144 void CcTest::TearDown() { |
| 145 if (isolate_ != NULL) isolate_->Dispose(); | 145 if (isolate_ != NULL) isolate_->Dispose(); |
| 146 } | 146 } |
| 147 | 147 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 CcTest::TearDown(); | 323 CcTest::TearDown(); |
| 324 // TODO(svenpanne) See comment above. | 324 // TODO(svenpanne) See comment above. |
| 325 // if (!disable_automatic_dispose_) v8::V8::Dispose(); | 325 // if (!disable_automatic_dispose_) v8::V8::Dispose(); |
| 326 v8::V8::ShutdownPlatform(); | 326 v8::V8::ShutdownPlatform(); |
| 327 delete platform; | 327 delete platform; |
| 328 return 0; | 328 return 0; |
| 329 } | 329 } |
| 330 | 330 |
| 331 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; | 331 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; |
| 332 int RegisterThreadedTest::count_ = 0; | 332 int RegisterThreadedTest::count_ = 0; |
| OLD | NEW |