// function to be called and not the code for Builtins::FunctionApply or
// Builtins::FunctionCall. The receiver of call/apply is the target
// function.
- if (!holder.is_null() && holder->IsJSFunction() &&
- !JSFunction::cast(*holder)->IsBuiltin()) {
+ if (!holder.is_null() && holder->IsJSFunction()) {
Handle<JSFunction> js_function = Handle<JSFunction>::cast(holder);
- Debug::FloodWithOneShot(js_function);
+ if (!js_function->IsBuiltin()) {
+ Debug::FloodWithOneShot(js_function);
+ } else if (js_function->shared()->bound()) {
+ // Handle Function.prototype.bind
+ Debug::FloodBoundFunctionWithOneShot(js_function);
+ }
}
} else {
Debug::FloodWithOneShot(function);
bound();
}
+// Test step into apply of bound function.
+function applyAndBind1() {
+ var bound = g.bind(null, 3);
+ debugger;
+ bound.apply(null, [3]);
+ var aLocalVar = 'test';
+ var anotherLocalVar = g(aLocalVar) + 's';
+ var yetAnotherLocal = 10;
+}
+
var testFunctions =
- [call1, call2, call3, call4, apply1, apply2, apply3, apply4, bind1];
+ [call1, call2, call3, call4, apply1, apply2, apply3, apply4, bind1,
+ applyAndBind1];
for (var i = 0; i < testFunctions.length; i++) {
state = 0;
assertEquals(3, state);
// Get rid of the debug event listener.
-Debug.setListener(null);
\ No newline at end of file
+Debug.setListener(null);