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

Unified Diff: src/debug.cc

Issue 2943002: Reimplement stack manipulations for LiveEdit (Closed)
Patch Set: follow codereview Created 10 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/factory.h » ('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 b8e0252aaef8a4e60eae6eb91729e3ff43c4f976..a8b89f4267df1a29a2f4716f05fffe719e1a8e67 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -39,6 +39,7 @@
#include "global-handles.h"
#include "ic.h"
#include "ic-inl.h"
+#include "liveedit.h"
#include "messages.h"
#include "natives.h"
#include "stub-cache.h"
@@ -947,10 +948,14 @@ Object* Debug::Break(Arguments args) {
thread_local_.after_break_target_ = plain_return->entry();
} else if (thread_local_.frame_drop_mode_ ==
FRAME_DROPPED_IN_DEBUG_SLOT_CALL) {
+ // Update top frame.
+ JavaScriptFrameIterator updated_frame_it;
+ frame = updated_frame_it.frame();
+
// Debug break slot stub does not return normally, instead it manually
// cleans the stack and jumps. We should patch the jump address.
- Code* plain_return = Builtins::builtin(Builtins::FrameDropper_LiveEdit);
- thread_local_.after_break_target_ = plain_return->entry();
+ thread_local_.after_break_target_ =
+ LiveEdit::GetRestarterPatchEntryPoint(frame->code());
} else if (thread_local_.frame_drop_mode_ == FRAME_DROPPED_IN_DIRECT_CALL) {
// Nothing to do, after_break_target is not used here.
} else {
@@ -1766,10 +1771,16 @@ bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) {
}
-void Debug::FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
+void Debug::FramesHaveBeenDropped(JavaScriptFrame* new_top_js_frame,
FrameDropMode mode) {
thread_local_.frame_drop_mode_ = mode;
- thread_local_.break_frame_id_ = new_break_frame_id;
+ thread_local_.break_frame_id_ = new_top_js_frame->id();
+ thread_local_.restarted_frame_fp_ = new_top_js_frame->fp();
+}
+
+
+Address Debug::GetRestartedFrameFp() {
+ return thread_local_.restarted_frame_fp_;
}
« no previous file with comments | « src/debug.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698