Status: New
Owner: ----

New issue 461 by flier.lu: Context::GetCurrent will crash if there is not a  
entered context
http://code.google.com/p/v8/issues/detail?id=461

please add some check like " if (last.is_null()) return Local<Context>();"

v8::Local<v8::Context> Context::GetEntered() {
   if (IsDeadCheck("v8::Context::GetEntered()")) return Local<Context>();
   i::Handle<i::Object> last = thread_local.LastEnteredContext();
   if (last.is_null()) return Local<Context>();
   i::Handle<i::Context> context = i::Handle<i::Context>::cast(last);
   return Utils::ToLocal(context);
}

v8::Local<v8::Context> Context::GetCurrent() {
   if (IsDeadCheck("v8::Context::GetCurrent()")) return Local<Context>();
   i::Handle<i::Context> context(i::Top::global_context());
   return Utils::ToLocal(context);
}

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to