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 29 matching lines...) Expand all Loading... |
40 #include <crtdbg.h> | 40 #include <crtdbg.h> |
41 #endif // defined(_MSC_VER) | 41 #endif // defined(_MSC_VER) |
42 #endif // defined(_WIN32) || defined(_WIN64) | 42 #endif // defined(_WIN32) || defined(_WIN64) |
43 | 43 |
44 enum InitializationState {kUnset, kUnintialized, kInitialized}; | 44 enum InitializationState {kUnset, kUnintialized, kInitialized}; |
45 static InitializationState initialization_state_ = kUnset; | 45 static InitializationState initialization_state_ = kUnset; |
46 static bool disable_automatic_dispose_ = false; | 46 static bool disable_automatic_dispose_ = false; |
47 | 47 |
48 CcTest* CcTest::last_ = NULL; | 48 CcTest* CcTest::last_ = NULL; |
49 bool CcTest::initialize_called_ = false; | 49 bool CcTest::initialize_called_ = false; |
50 bool CcTest::isolate_used_ = false; | 50 v8::base::Atomic32 CcTest::isolate_used_ = 0; |
51 v8::Isolate* CcTest::isolate_ = NULL; | 51 v8::Isolate* CcTest::isolate_ = NULL; |
52 | 52 |
53 | 53 |
54 CcTest::CcTest(TestFunction* callback, const char* file, const char* name, | 54 CcTest::CcTest(TestFunction* callback, const char* file, const char* name, |
55 const char* dependency, bool enabled, bool initialize) | 55 const char* dependency, bool enabled, bool initialize) |
56 : callback_(callback), name_(name), dependency_(dependency), | 56 : callback_(callback), name_(name), dependency_(dependency), |
57 enabled_(enabled), initialize_(initialize), prev_(last_) { | 57 enabled_(enabled), initialize_(initialize), prev_(last_) { |
58 // Find the base name of this test (const_cast required on Windows). | 58 // Find the base name of this test (const_cast required on Windows). |
59 char *basename = strrchr(const_cast<char *>(file), '/'); | 59 char *basename = strrchr(const_cast<char *>(file), '/'); |
60 if (!basename) { | 60 if (!basename) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 CcTest::TearDown(); | 227 CcTest::TearDown(); |
228 // TODO(svenpanne) See comment above. | 228 // TODO(svenpanne) See comment above. |
229 // if (!disable_automatic_dispose_) v8::V8::Dispose(); | 229 // if (!disable_automatic_dispose_) v8::V8::Dispose(); |
230 v8::V8::ShutdownPlatform(); | 230 v8::V8::ShutdownPlatform(); |
231 delete platform; | 231 delete platform; |
232 return 0; | 232 return 0; |
233 } | 233 } |
234 | 234 |
235 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; | 235 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; |
236 int RegisterThreadedTest::count_ = 0; | 236 int RegisterThreadedTest::count_ = 0; |
OLD | NEW |