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 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 isolate_ = v8::Isolate::New(create_params); | 94 isolate_ = v8::Isolate::New(create_params); |
95 } | 95 } |
96 isolate_->Enter(); | 96 isolate_->Enter(); |
97 } | 97 } |
98 callback_(); | 98 callback_(); |
99 if (initialize_) { | 99 if (initialize_) { |
| 100 EmptyMessageQueues(isolate_); |
100 isolate_->Exit(); | 101 isolate_->Exit(); |
101 } | 102 } |
102 } | 103 } |
103 | 104 |
104 | 105 |
105 v8::Local<v8::Context> CcTest::NewContext(CcTestExtensionFlags extensions, | 106 v8::Local<v8::Context> CcTest::NewContext(CcTestExtensionFlags extensions, |
106 v8::Isolate* isolate) { | 107 v8::Isolate* isolate) { |
107 const char* extension_names[kMaxExtensions]; | 108 const char* extension_names[kMaxExtensions]; |
108 int extension_count = 0; | 109 int extension_count = 0; |
109 #define CHECK_EXTENSION_FLAG(Name, Id) \ | 110 #define CHECK_EXTENSION_FLAG(Name, Id) \ |
(...skipping 127 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 |