Commit 4c691429 authored by yangguo's avatar yangguo Committed by Commit bot

[debug] fix return position computation for liveedit.

R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2107693002
Cr-Commit-Position: refs/heads/master@{#37316}
parent ca1dcc9c
...@@ -67,7 +67,6 @@ BreakLocation::BreakLocation(Handle<DebugInfo> debug_info, DebugBreakType type, ...@@ -67,7 +67,6 @@ BreakLocation::BreakLocation(Handle<DebugInfo> debug_info, DebugBreakType type,
type_(type), type_(type),
position_(position), position_(position),
statement_position_(statement_position) { statement_position_(statement_position) {
#ifdef DEBUG
if (type == DEBUG_BREAK_SLOT_AT_RETURN) { if (type == DEBUG_BREAK_SLOT_AT_RETURN) {
int return_position = 0; int return_position = 0;
SharedFunctionInfo* shared = debug_info->shared(); SharedFunctionInfo* shared = debug_info->shared();
...@@ -75,10 +74,10 @@ BreakLocation::BreakLocation(Handle<DebugInfo> debug_info, DebugBreakType type, ...@@ -75,10 +74,10 @@ BreakLocation::BreakLocation(Handle<DebugInfo> debug_info, DebugBreakType type,
return_position = return_position =
std::max(shared->end_position() - shared->start_position() - 1, 0); std::max(shared->end_position() - shared->start_position() - 1, 0);
} }
CHECK_EQ(return_position, position); // TODO(yangguo): find out why return position is wrong for liveedit.
CHECK_EQ(return_position, statement_position); position_ = return_position;
statement_position = return_position;
} }
#endif // DEBUG
} }
BreakLocation::Iterator* BreakLocation::GetIterator( BreakLocation::Iterator* BreakLocation::GetIterator(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment