Reviewers: Søren Gjesse, Description: Add missing null check in Context::GetCurrent.
Please review this at http://codereview.chromium.org/272007 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/api.cc Index: src/api.cc =================================================================== --- src/api.cc (revision 3040) +++ src/api.cc (working copy) @@ -2760,7 +2760,9 @@ 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); } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
