Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: src/debug.cc

Issue 149326: Process correctly stepping into function calls (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug.h ('k') | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
===================================================================
--- src/debug.cc (revision 2424)
+++ src/debug.cc (working copy)
@@ -1260,6 +1260,7 @@
// Handle stepping into a function.
void Debug::HandleStepIn(Handle<JSFunction> function,
+ Handle<Object> holder,
Address fp,
bool is_constructor) {
// If the frame pointer is not supplied by the caller find it.
@@ -1285,21 +1286,12 @@
Builtins::builtin(Builtins::FunctionCall)) {
// Handle function.apply and function.call separately to flood the
// function to be called and not the code for Builtins::FunctionApply or
- // Builtins::FunctionCall. At the point of the call IC to call either
- // Builtins::FunctionApply or Builtins::FunctionCall the expression
- // stack has the following content:
- // symbol "apply" or "call"
- // function apply or call was called on
- // receiver for apply or call (first parameter to apply or call)
- // ... further arguments to apply or call.
- JavaScriptFrameIterator it;
- ASSERT(it.frame()->fp() == fp);
- ASSERT(it.frame()->GetExpression(1)->IsJSFunction());
- if (it.frame()->GetExpression(1)->IsJSFunction()) {
- Handle<JSFunction>
- actual_function(JSFunction::cast(it.frame()->GetExpression(1)));
- Handle<SharedFunctionInfo> actual_shared(actual_function->shared());
- Debug::FloodWithOneShot(actual_shared);
+ // Builtins::FunctionCall. The receiver of call/apply is the target
+ // function.
+ if (!holder.is_null() && holder->IsJSFunction()) {
+ Handle<SharedFunctionInfo> shared_info(
+ JSFunction::cast(*holder)->shared());
+ Debug::FloodWithOneShot(shared_info);
}
} else {
Debug::FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared()));
« no previous file with comments | « src/debug.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698