Push version 2.2.24 to trunk.

Added API for capturing stack traces for uncaught exceptions.

Fixed crash bug when preparsing from a non-external V8 string (issue 775).

Fixed JSON.parse bug causing input not to be converted to string (issue 764).

Added ES5 Object.freeze and Object.isFrozen.

Performance improvements on all platforms.


git-svn-id: http://v8.googlecode.com/svn/trunk@5060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/frames.cc b/src/frames.cc
index 67a20d3..8b601b6 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -532,8 +532,11 @@
   if (IsConstructor()) accumulator->Add("new ");
   accumulator->PrintFunction(function, receiver, &code);
 
+  Handle<Object> scope_info(ScopeInfo<>::EmptyHeapObject());
+
   if (function->IsJSFunction()) {
     Handle<SharedFunctionInfo> shared(JSFunction::cast(function)->shared());
+    scope_info = Handle<Object>(shared->scope_info());
     Object* script_obj = shared->script();
     if (script_obj->IsScript()) {
       Handle<Script> script(Script::cast(script_obj));
@@ -561,7 +564,7 @@
   // Get scope information for nicer output, if possible. If code is
   // NULL, or doesn't contain scope info, info will return 0 for the
   // number of parameters, stack slots, or context slots.
-  ScopeInfo<PreallocatedStorage> info(code);
+  ScopeInfo<PreallocatedStorage> info(*scope_info);
 
   // Print the parameters.
   int parameters_count = ComputeParametersCount();