Commit 3da53e3e authored by ager@chromium.org's avatar ager@chromium.org

Add missing null check to Context::GetCalling().

Review URL: http://codereview.chromium.org/248017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1ef87545
......@@ -2759,7 +2759,9 @@ v8::Local<v8::Context> Context::GetCurrent() {
v8::Local<v8::Context> Context::GetCalling() {
if (IsDeadCheck("v8::Context::GetCalling()")) return Local<Context>();
i::Handle<i::Context> context(i::Top::GetCallingGlobalContext());
i::Handle<i::Object> calling = i::Top::GetCallingGlobalContext();
if (calling.is_null()) return Local<Context>();
i::Handle<i::Context> context = i::Handle<i::Context>::cast(calling);
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