| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 4d221bf365bf3820697b829d064014b4c8a9ac86..734a7e9db88f94933a61712cff0d73c5884937d4 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -6487,6 +6487,10 @@ void V8::CancelTerminateExecution(Isolate* isolate) {
|
|
|
| Isolate* Isolate::GetCurrent() {
|
| i::Isolate* isolate = i::Isolate::UncheckedCurrent();
|
| + if (isolate == NULL) {
|
| + isolate = i::Isolate::EnsureDefaultIsolate(true);
|
| + ASSERT(isolate == i::Isolate::UncheckedCurrent());
|
| + }
|
| return reinterpret_cast<Isolate*>(isolate);
|
| }
|
|
|
|
|