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