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

Side by Side Diff: src/debug.h

Issue 2866008: [Isolates] Move contents of Top into Isolate.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: ensure we're synced 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/contexts.h ('k') | src/debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 Debug::NewBreak(it_.frame()->id()); 788 Debug::NewBreak(it_.frame()->id());
789 } else { 789 } else {
790 Debug::NewBreak(StackFrame::NO_ID); 790 Debug::NewBreak(StackFrame::NO_ID);
791 } 791 }
792 792
793 // Make sure that debugger is loaded and enter the debugger context. 793 // Make sure that debugger is loaded and enter the debugger context.
794 load_failed_ = !Debug::Load(); 794 load_failed_ = !Debug::Load();
795 if (!load_failed_) { 795 if (!load_failed_) {
796 // NOTE the member variable save which saves the previous context before 796 // NOTE the member variable save which saves the previous context before
797 // this change. 797 // this change.
798 Top::set_context(*Debug::debug_context()); 798 Isolate::Current()->set_context(*Debug::debug_context());
799 } 799 }
800 } 800 }
801 801
802 ~EnterDebugger() { 802 ~EnterDebugger() {
803 // TODO(isolates): Check to see if this is the same isolate as in the 803 // TODO(isolates): Check to see if this is the same isolate as in the
804 // constructor. 804 // constructor.
805 Isolate* isolate = Isolate::Current(); 805 Isolate* isolate = Isolate::Current();
806 806
807 // Restore to the previous break state. 807 // Restore to the previous break state.
808 Debug::SetBreak(break_frame_id_, break_id_); 808 Debug::SetBreak(break_frame_id_, break_id_);
809 809
810 // Check for leaving the debugger. 810 // Check for leaving the debugger.
811 if (prev_ == NULL) { 811 if (prev_ == NULL) {
812 // Clear mirror cache when leaving the debugger. Skip this if there is a 812 // Clear mirror cache when leaving the debugger. Skip this if there is a
813 // pending exception as clearing the mirror cache calls back into 813 // pending exception as clearing the mirror cache calls back into
814 // JavaScript. This can happen if the v8::Debug::Call is used in which 814 // JavaScript. This can happen if the v8::Debug::Call is used in which
815 // case the exception should end up in the calling code. 815 // case the exception should end up in the calling code.
816 if (!Top::has_pending_exception()) { 816 if (!isolate->has_pending_exception()) {
817 // Try to avoid any pending debug break breaking in the clear mirror 817 // Try to avoid any pending debug break breaking in the clear mirror
818 // cache JavaScript code. 818 // cache JavaScript code.
819 if (isolate->stack_guard()->IsDebugBreak()) { 819 if (isolate->stack_guard()->IsDebugBreak()) {
820 Debug::set_interrupts_pending(DEBUGBREAK); 820 Debug::set_interrupts_pending(DEBUGBREAK);
821 isolate->stack_guard()->Continue(DEBUGBREAK); 821 isolate->stack_guard()->Continue(DEBUGBREAK);
822 } 822 }
823 Debug::ClearMirrorCache(); 823 Debug::ClearMirrorCache();
824 } 824 }
825 825
826 // Request preemption and debug break when leaving the last debugger entry 826 // Request preemption and debug break when leaving the last debugger entry
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 953
954 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); 954 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread);
955 }; 955 };
956 956
957 957
958 } } // namespace v8::internal 958 } } // namespace v8::internal
959 959
960 #endif // ENABLE_DEBUGGER_SUPPORT 960 #endif // ENABLE_DEBUGGER_SUPPORT
961 961
962 #endif // V8_DEBUG_H_ 962 #endif // V8_DEBUG_H_
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698