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

Unified Diff: src/debug.cc

Issue 1118007: LiveEdit: implement frame dropping (Closed)
Patch Set: adding rule to mjsunit.status Created 10 years, 8 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/debug-debugger.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 4dce4cff053ff630fba8a2f9db2962fbe55e6608..bac05a06c4446aefbbc3a915a499e77fc7fc3d2b 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -814,6 +814,8 @@ Object* Debug::Break(Arguments args) {
HandleScope scope;
ASSERT(args.length() == 0);
+ thread_local_.frames_are_dropped_ = false;
+
// Get the top-most JavaScript frame.
JavaScriptFrameIterator it;
JavaScriptFrame* frame = it.frame();
@@ -890,8 +892,13 @@ Object* Debug::Break(Arguments args) {
PrepareStep(step_action, step_count);
}
- // Install jump to the call address which was overwritten.
- SetAfterBreakTarget(frame);
+ if (thread_local_.frames_are_dropped_) {
+ // We must have been calling IC stub. Do not return there anymore.
+ Code* plain_return = Builtins::builtin(Builtins::PlainReturn_LiveEdit);
+ thread_local_.after_break_target_ = plain_return->entry();
+ } else {
+ SetAfterBreakTarget(frame);
+ }
return Heap::undefined_value();
}
@@ -1655,6 +1662,12 @@ void Debug::SetAfterBreakTarget(JavaScriptFrame* frame) {
}
+void Debug::FramesHaveBeenDropped(StackFrame::Id new_break_frame_id) {
+ thread_local_.frames_are_dropped_ = true;
+ thread_local_.break_frame_id_ = new_break_frame_id;
+}
+
+
bool Debug::IsDebugGlobal(GlobalObject* global) {
return IsLoaded() && global == Debug::debug_context()->global();
}
« no previous file with comments | « src/debug.h ('k') | src/debug-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698