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

Side by Side Diff: src/debug.cc

Issue 546125: A brutal approach to V8 script liveedit (Closed)
Patch Set: merge Created 10 years, 10 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
« no previous file with comments | « src/debug.h ('k') | src/debug-delay.js » ('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 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 } 1952 }
1953 1953
1954 // Process debug event. 1954 // Process debug event.
1955 ProcessDebugEvent(v8::BeforeCompile, 1955 ProcessDebugEvent(v8::BeforeCompile,
1956 Handle<JSObject>::cast(event_data), 1956 Handle<JSObject>::cast(event_data),
1957 true); 1957 true);
1958 } 1958 }
1959 1959
1960 1960
1961 // Handle debugger actions when a new script is compiled. 1961 // Handle debugger actions when a new script is compiled.
1962 void Debugger::OnAfterCompile(Handle<Script> script, Handle<JSFunction> fun) { 1962 // TODO(peter.rybin): consider removing unused fun argument
1963 void Debugger::OnAfterCompile(Handle<Script> script, Handle<JSFunction> fun,
1964 bool send_from_debugger) {
1963 HandleScope scope; 1965 HandleScope scope;
1964 1966
1965 // Add the newly compiled script to the script cache. 1967 // Add the newly compiled script to the script cache.
1966 Debug::AddScriptToScriptCache(script); 1968 Debug::AddScriptToScriptCache(script);
1967 1969
1968 // No more to do if not debugging. 1970 // No more to do if not debugging.
1969 if (!IsDebuggerActive()) return; 1971 if (!IsDebuggerActive()) return;
1970 1972
1971 // No compile events while compiling natives. 1973 // No compile events while compiling natives.
1972 if (compiling_natives()) return; 1974 if (compiling_natives()) return;
(...skipping 26 matching lines...) Expand all
1999 const int argc = 1; 2001 const int argc = 1;
2000 Object** argv[argc] = { reinterpret_cast<Object**>(wrapper.location()) }; 2002 Object** argv[argc] = { reinterpret_cast<Object**>(wrapper.location()) };
2001 Handle<Object> result = Execution::TryCall( 2003 Handle<Object> result = Execution::TryCall(
2002 Handle<JSFunction>::cast(update_script_break_points), 2004 Handle<JSFunction>::cast(update_script_break_points),
2003 Top::builtins(), argc, argv, 2005 Top::builtins(), argc, argv,
2004 &caught_exception); 2006 &caught_exception);
2005 if (caught_exception) { 2007 if (caught_exception) {
2006 return; 2008 return;
2007 } 2009 }
2008 // Bail out based on state or if there is no listener for this event 2010 // Bail out based on state or if there is no listener for this event
2009 if (in_debugger) return; 2011 if (in_debugger && !send_from_debugger) return;
2010 if (!Debugger::EventActive(v8::AfterCompile)) return; 2012 if (!Debugger::EventActive(v8::AfterCompile)) return;
2011 2013
2012 // Create the compile state object. 2014 // Create the compile state object.
2013 Handle<Object> event_data = MakeCompileEvent(script, 2015 Handle<Object> event_data = MakeCompileEvent(script,
2014 false, 2016 false,
2015 &caught_exception); 2017 &caught_exception);
2016 // Bail out and don't call debugger if exception. 2018 // Bail out and don't call debugger if exception.
2017 if (caught_exception) { 2019 if (caught_exception) {
2018 return; 2020 return;
2019 } 2021 }
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 { 2790 {
2789 Locker locker; 2791 Locker locker;
2790 Debugger::CallMessageDispatchHandler(); 2792 Debugger::CallMessageDispatchHandler();
2791 } 2793 }
2792 } 2794 }
2793 } 2795 }
2794 2796
2795 #endif // ENABLE_DEBUGGER_SUPPORT 2797 #endif // ENABLE_DEBUGGER_SUPPORT
2796 2798
2797 } } // namespace v8::internal 2799 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.h ('k') | src/debug-delay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698