Commit 94799218 authored by ager@chromium.org's avatar ager@chromium.org

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
parent 8222bf3b
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment