| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 734a7e9db88f94933a61712cff0d73c5884937d4..11eaf924a27c88decff9fb87f820ef846473572b 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -5007,13 +5007,14 @@ void v8::V8::SetArrayBufferAllocator(
|
|
|
|
|
| bool v8::V8::Dispose() {
|
| - i::Isolate* isolate = i::Isolate::UncheckedCurrent();
|
| - if (!ApiCheck(isolate == NULL || isolate->IsDefaultIsolate(),
|
| + i::Isolate* isolate = i::Isolate::Current();
|
| + if (!ApiCheck(isolate != NULL && isolate->IsDefaultIsolate(),
|
| "v8::V8::Dispose()",
|
| "Use v8::Isolate::Dispose() for a non-default isolate.")) {
|
| return false;
|
| }
|
| - return i::V8::TearDown();
|
| + i::V8::TearDown();
|
| + return true;
|
| }
|
|
|
|
|
| @@ -6487,10 +6488,6 @@ 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);
|
| }
|
|
|
|
|