| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 7e0c36aca3c27f1885a34517114f86046f3131e2..f86d5dc143b4e898eeee294733c79f66ab5f02b4 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -390,10 +390,13 @@ void Isolate::SetCrashIfDefaultIsolateInitialized() {
|
| }
|
|
|
|
|
| -Isolate* Isolate::EnsureDefaultIsolate() {
|
| +Isolate* Isolate::EnsureDefaultIsolate(bool must_be_null) {
|
| static Isolate* default_isolate_ = NULL;
|
| LockGuard<Mutex> lock_guard(&process_wide_mutex_);
|
| CHECK(default_isolate_status_ != kDefaultIsolateCrashIfInitialized);
|
| + if (must_be_null) {
|
| + CHECK(default_isolate_ == NULL);
|
| + }
|
| if (default_isolate_ == NULL) {
|
| default_isolate_ = new Isolate(true);
|
| }
|
|
|