Add missing null check in Context::GetCurrent.
Review URL: http://codereview.chromium.org/272007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
8222bf3ba7
commit
947992185a
@ -2760,7 +2760,9 @@ v8::Local<v8::Context> Context::GetEntered() {
|
||||
|
||||
v8::Local<v8::Context> Context::GetCurrent() {
|
||||
if (IsDeadCheck("v8::Context::GetCurrent()")) return Local<Context>();
|
||||
i::Handle<i::Context> context(i::Top::global_context());
|
||||
i::Handle<i::Object> current = i::Top::global_context();
|
||||
if (current.is_null()) return Local<Context>();
|
||||
i::Handle<i::Context> context = i::Handle<i::Context>::cast(current);
|
||||
return Utils::ToLocal(context);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user