Version 2.3.4

Fixed problems in implementation of ES5 function.prototype.bind.

Fixed error when using apply with arguments object on ARM (issue 784).

Added setting of global flags to debugger protocol.

Fixed an error affecting cached results of sin and cos (issue 792).

Removed memory leak from a boundary case where V8 is not initialized.

Fixed issue where debugger could set breakpoints outside the body of a function.

Fixed issue in debugger when using both live edit and step in features.

Added Number-letter (Nl) category to Unicode tables.  These characters can now be used in identifiers.

Fixed an assert failure on X64 (issue 806).

Performance improvements on all platforms.


git-svn-id: http://v8.googlecode.com/svn/trunk@5164 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/runtime.cc b/src/runtime.cc
index a6924a0..d460e44 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6757,17 +6757,23 @@
   CONVERT_ARG_CHECKED(JSFunction, function, 0);
   CONVERT_ARG_CHECKED(JSArray, params, 1);
 
+  RUNTIME_ASSERT(params->HasFastElements());
   FixedArray* fixed = FixedArray::cast(params->elements());
 
-  bool exception = false;
-  Object*** param_data = NewArray<Object**>(fixed->length());
-  for (int i = 0; i < fixed->length();  i++) {
+  int fixed_length = Smi::cast(params->length())->value();
+  SmartPointer<Object**> param_data(NewArray<Object**>(fixed_length));
+  for (int i = 0; i < fixed_length; i++) {
     Handle<Object> val = Handle<Object>(fixed->get(i));
     param_data[i] = val.location();
   }
 
+  bool exception = false;
   Handle<Object> result = Execution::New(
-      function, fixed->length(), param_data, &exception);
+      function, fixed_length, *param_data, &exception);
+  if (exception) {
+      return Failure::Exception();
+  }
+  ASSERT(!result.is_null());
   return *result;
 }
 
@@ -9237,6 +9243,17 @@
 }
 
 
+// Sets the disable break state
+// args[0]: disable break state
+static Object* Runtime_SetDisableBreak(Arguments args) {
+  HandleScope scope;
+  ASSERT(args.length() == 1);
+  CONVERT_BOOLEAN_CHECKED(disable_break, args[0]);
+  Debug::set_disable_break(disable_break);
+  return  Heap::undefined_value();
+}
+
+
 static Object* Runtime_GetBreakLocations(Arguments args) {
   HandleScope scope;
   ASSERT(args.length() == 1);
@@ -9381,13 +9398,6 @@
     }
     Debug::SetBreakPoint(shared, break_point_object_arg, &position);
     position += shared->start_position();
-
-    // The result position may become beyond script source end.
-    // This is expected when the function is toplevel. This may become
-    // a problem later when actual position gets converted into line/column.
-    if (shared->is_toplevel() && position == shared->end_position()) {
-      position = shared->end_position() - 1;
-    }
     return Smi::FromInt(position);
   }
   return  Heap::undefined_value();