Revision: 16777
Author: [email protected]
Date: Tue Sep 17 17:35:36 2013 UTC
Log: Support stepin for combination of apply and bound function
[email protected]
Review URL: https://codereview.chromium.org/23513023
http://code.google.com/p/v8/source/detail?r=16777
Modified:
/branches/bleeding_edge/src/debug.cc
/branches/bleeding_edge/test/mjsunit/debug-stepin-function-call.js
=======================================
--- /branches/bleeding_edge/src/debug.cc Thu Sep 12 11:30:56 2013 UTC
+++ /branches/bleeding_edge/src/debug.cc Tue Sep 17 17:35:36 2013 UTC
@@ -1793,10 +1793,14 @@
// 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);
=======================================
--- /branches/bleeding_edge/test/mjsunit/debug-stepin-function-call.js Thu
Mar 15 14:17:22 2012 UTC
+++ /branches/bleeding_edge/test/mjsunit/debug-stepin-function-call.js Tue
Sep 17 17:35:36 2013 UTC
@@ -141,9 +141,20 @@
debugger;
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;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.