| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 if (!initialize_) { | 84 if (!initialize_) { |
| 85 CHECK(initialization_state_ != kInitialized); | 85 CHECK(initialization_state_ != kInitialized); |
| 86 initialization_state_ = kUnintialized; | 86 initialization_state_ = kUnintialized; |
| 87 CHECK(CcTest::isolate_ == NULL); | 87 CHECK(CcTest::isolate_ == NULL); |
| 88 } else { | 88 } else { |
| 89 CHECK(initialization_state_ != kUnintialized); | 89 CHECK(initialization_state_ != kUnintialized); |
| 90 initialization_state_ = kInitialized; | 90 initialization_state_ = kInitialized; |
| 91 if (isolate_ == NULL) { | 91 if (isolate_ == NULL) { |
| 92 v8::Isolate::CreateParams create_params; | 92 v8::Isolate::CreateParams create_params; |
| 93 create_params.array_buffer_allocator = allocator_; | 93 create_params.array_buffer_allocator = allocator_; |
| 94 create_params.shared_array_buffer_allocator = allocator_; |
| 94 isolate_ = v8::Isolate::New(create_params); | 95 isolate_ = v8::Isolate::New(create_params); |
| 95 } | 96 } |
| 96 isolate_->Enter(); | 97 isolate_->Enter(); |
| 97 } | 98 } |
| 98 callback_(); | 99 callback_(); |
| 99 if (initialize_) { | 100 if (initialize_) { |
| 100 isolate_->Exit(); | 101 isolate_->Exit(); |
| 101 } | 102 } |
| 102 } | 103 } |
| 103 | 104 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 CcTest::TearDown(); | 238 CcTest::TearDown(); |
| 238 // TODO(svenpanne) See comment above. | 239 // TODO(svenpanne) See comment above. |
| 239 // if (!disable_automatic_dispose_) v8::V8::Dispose(); | 240 // if (!disable_automatic_dispose_) v8::V8::Dispose(); |
| 240 v8::V8::ShutdownPlatform(); | 241 v8::V8::ShutdownPlatform(); |
| 241 delete platform; | 242 delete platform; |
| 242 return 0; | 243 return 0; |
| 243 } | 244 } |
| 244 | 245 |
| 245 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; | 246 RegisterThreadedTest *RegisterThreadedTest::first_ = NULL; |
| 246 int RegisterThreadedTest::count_ = 0; | 247 int RegisterThreadedTest::count_ = 0; |
| OLD | NEW |