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

Side by Side Diff: src/liveedit.cc

Issue 325183003: Ignore live_edit_ flag when when dealing with LiveEdit in a debug break. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/liveedit.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #include "src/v8.h" 6 #include "src/v8.h"
7 7
8 #include "src/liveedit.h" 8 #include "src/liveedit.h"
9 9
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 798
799 return scope_info_list; 799 return scope_info_list;
800 } 800 }
801 801
802 Handle<JSArray> result_; 802 Handle<JSArray> result_;
803 int len_; 803 int len_;
804 int current_parent_index_; 804 int current_parent_index_;
805 }; 805 };
806 806
807 807
808 Address LiveEdit::AfterBreakTarget(FrameDropMode mode, Isolate* isolate) { 808 void LiveEdit::InitializeThreadLocal(Debug* debug) {
809 debug->thread_local_.frame_drop_mode_ = LiveEdit::FRAMES_UNTOUCHED;
810 }
811
812
813 bool LiveEdit::SetAfterBreakTarget(Debug* debug) {
809 Code* code = NULL; 814 Code* code = NULL;
810 switch (mode) { 815 Isolate* isolate = debug->isolate_;
816 switch (debug->thread_local_.frame_drop_mode_) {
811 case FRAMES_UNTOUCHED: 817 case FRAMES_UNTOUCHED:
812 break; 818 return false;
813 case FRAME_DROPPED_IN_IC_CALL: 819 case FRAME_DROPPED_IN_IC_CALL:
814 // We must have been calling IC stub. Do not go there anymore. 820 // We must have been calling IC stub. Do not go there anymore.
815 code = isolate->builtins()->builtin(Builtins::kPlainReturn_LiveEdit); 821 code = isolate->builtins()->builtin(Builtins::kPlainReturn_LiveEdit);
816 break; 822 break;
817 case FRAME_DROPPED_IN_DEBUG_SLOT_CALL: 823 case FRAME_DROPPED_IN_DEBUG_SLOT_CALL:
818 // Debug break slot stub does not return normally, instead it manually 824 // Debug break slot stub does not return normally, instead it manually
819 // cleans the stack and jumps. We should patch the jump address. 825 // cleans the stack and jumps. We should patch the jump address.
820 code = isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit); 826 code = isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit);
821 break; 827 break;
822 case FRAME_DROPPED_IN_DIRECT_CALL: 828 case FRAME_DROPPED_IN_DIRECT_CALL:
823 // Nothing to do, after_break_target is not used here. 829 // Nothing to do, after_break_target is not used here.
824 break; 830 return true;
825 case FRAME_DROPPED_IN_RETURN_CALL: 831 case FRAME_DROPPED_IN_RETURN_CALL:
826 code = isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit); 832 code = isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit);
827 break; 833 break;
828 case CURRENTLY_SET_MODE: 834 case CURRENTLY_SET_MODE:
829 UNREACHABLE(); 835 UNREACHABLE();
830 break; 836 break;
831 } 837 }
832 if (code == NULL) return NULL; 838 debug->after_break_target_ = code->entry();
833 return code->entry(); 839 return true;
834 } 840 }
835 841
836 842
837 MaybeHandle<JSArray> LiveEdit::GatherCompileInfo(Handle<Script> script, 843 MaybeHandle<JSArray> LiveEdit::GatherCompileInfo(Handle<Script> script,
838 Handle<String> source) { 844 Handle<String> source) {
839 Isolate* isolate = script->GetIsolate(); 845 Isolate* isolate = script->GetIsolate();
840 846
841 FunctionInfoListener listener(isolate); 847 FunctionInfoListener listener(isolate);
842 Handle<Object> original_source = 848 Handle<Object> original_source =
843 Handle<Object>(script->source(), isolate); 849 Handle<Object>(script->source(), isolate);
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) { 2078 void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) {
2073 isolate_->active_function_info_listener()->FunctionCode(code); 2079 isolate_->active_function_info_listener()->FunctionCode(code);
2074 } 2080 }
2075 2081
2076 2082
2077 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { 2083 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) {
2078 return isolate->active_function_info_listener() != NULL; 2084 return isolate->active_function_info_listener() != NULL;
2079 } 2085 }
2080 2086
2081 } } // namespace v8::internal 2087 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/liveedit.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698