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

Unified Diff: src/runtime.cc

Issue 2824007: Fix a bug when top level break points fall into the last function in script. (Closed)
Patch Set: Update after review Created 10 years, 6 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 | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 681fdcf439e6319cac1f9af5b3c8beb40d5722c6..d71a22b5c8514ff7413b4e33ff5736f7d32b7e60 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -9081,8 +9081,6 @@ Object* Runtime::FindSharedFunctionInfoInScript(Handle<Script> script,
// The current candidate for the source position:
int target_start_position = RelocInfo::kNoPosition;
Handle<SharedFunctionInfo> target;
- // The current candidate for the last function in script:
- Handle<SharedFunctionInfo> last;
while (!done) {
HeapIterator iterator;
for (HeapObject* obj = iterator.next();
@@ -9123,25 +9121,12 @@ Object* Runtime::FindSharedFunctionInfoInScript(Handle<Script> script,
}
}
}
-
- // Keep track of the last function in the script.
- if (last.is_null() ||
- shared->end_position() > last->start_position()) {
- last = shared;
- }
}
}
}
- // Make sure some candidate is selected.
if (target.is_null()) {
- if (!last.is_null()) {
- // Position after the last function - use last.
- target = last;
- } else {
- // Unable to find function - possibly script without any function.
- return Heap::undefined_value();
- }
+ return Heap::undefined_value();
}
// If the candidate found is compiled we are done. NOTE: when lazy
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698